Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AppDeggendorf_Flutter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chaitanya Mangra
AppDeggendorf_Flutter
Merge requests
!2
Home page chaitanya
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Home page chaitanya
home_page_Chaitanya
into
Deggendorf_App_1.0
Overview
1
Commits
24
Pipelines
0
Changes
4
Merged
Chaitanya Mangra
requested to merge
home_page_Chaitanya
into
Deggendorf_App_1.0
2 years ago
Overview
1
Commits
24
Pipelines
0
Changes
4
Expand
Created by: Daesslohnt
0
0
Merge request reports
Viewing commit
dea9d537
Prev
Next
Show latest version
4 files
+
302
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
dea9d537
settings ui base
· dea9d537
Anager
authored
3 years ago
lib/bottom_navigation_bar_buttons/settings/settings.dart
0 → 100644
+
196
−
0
Options
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
class
SettingScreen
extends
StatelessWidget
{
const
SettingScreen
({
Key
?
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
backgroundColor:
Colors
.
pink
,
title:
Text
(
"Einstellungen"
,
style:
TextStyle
(
fontSize:
25
,
color:
Colors
.
white
),
),
),
body:
Container
(
padding:
EdgeInsets
.
all
(
8
),
child:
ListView
(
children:
[
StandardSettingButton
(
xOffset:
150
,
title:
"Kennwort"
,
label:
""
,),
StandardSettingButton
(
xOffset:
127
,
title:
"Benutzername"
,
label:
""
),
DropdownSettingButton
()
],
),
),
);
}
}
class
DropdownSettingButton
extends
StatefulWidget
{
const
DropdownSettingButton
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
DropdownSettingButton
>
createState
()
=
>
_DropdownSettingButtonState
();
}
class
_DropdownSettingButtonState
extends
State
<
DropdownSettingButton
>
{
bool
_expanded
=
false
;
String
currentCity
=
"Deggendorf"
;
void
setCurrentCity
(
bool
isDeg
){
if
(
isDeg
){
currentCity
=
"Deggendorf"
;
}
else
{
currentCity
=
"Plattling"
;
}
}
@override
Widget
build
(
BuildContext
context
)
{
return
ExpansionPanelList
(
animationDuration:
Duration
(
microseconds:
2000
),
children:
[
ExpansionPanel
(
canTapOnHeader:
true
,
isExpanded:
_expanded
,
headerBuilder:
(
context
,
isExpanded
){
return
ListTile
(
title:
Text
(
"Aktuelle Stadt:
${currentCity}
"
,
style:
TextStyle
(
fontSize:
22
,
color:
Color
.
fromRGBO
(
1
,
1
,
1
,
0.49411764705882355
))
),
);
},
body:
Column
(
children:
<
Widget
>
[
TextButton
(
onPressed:
(){
setCurrentCity
(
true
);
_expanded
=
false
;
setState
(()
{
});
},
child:
Text
(
"Deggendorf"
,
style:
TextStyle
(
fontSize:
20
,
color:
Color
.
fromRGBO
(
1
,
1
,
1
,
0.49411764705882355
)),
)
),
TextButton
(
onPressed:
(){
setCurrentCity
(
false
);
_expanded
=
false
;
setState
(()
{
});
},
child:
Text
(
"Plattling"
,
style:
TextStyle
(
fontSize:
20
,
color:
Color
.
fromRGBO
(
1
,
1
,
1
,
0.49411764705882355
)),
)
),
],
)
)
],
expansionCallback:
(
panelIndex
,
isExpanded
){
_expanded
=
!
_expanded
;
setState
(()
{
});
},
);
}
}
class
StandardSettingButton
extends
StatefulWidget
{
const
StandardSettingButton
({
Key
?
key
,
required
this
.
xOffset
,
required
this
.
title
,
required
this
.
label
})
:
super
(
key:
key
);
final
double
xOffset
;
final
String
title
;
final
String
label
;
@override
State
<
StandardSettingButton
>
createState
()
=
>
_StandardSettingButtonState
();
}
class
_StandardSettingButtonState
extends
State
<
StandardSettingButton
>
{
bool
isPassword
(){
if
(
widget
.
title
==
"Kennwort"
){
return
true
;
}
return
false
;
}
@override
Widget
build
(
BuildContext
context
)
{
return
TextButton
(
onPressed:
(){
showDialog
(
context:
context
,
builder:
(
context
)
=
>
AlertDialog
(
title:
Text
(
"Wollen Sie
${widget.title}
ändern?"
,
style:
TextStyle
(
fontSize:
16
),
),
content:
TextField
(
obscureText:
isPassword
()
,
decoration:
InputDecoration
(
hintText:
"geben Sie
${widget.title}
ein"
),
),
actions:
[
TextButton
(
onPressed:
(){
Navigator
.
pop
(
context
);},
child:
Text
(
"ändern"
)
),
TextButton
(
onPressed:
(){
Navigator
.
pop
(
context
);
},
child:
Text
(
"abbrechen"
)
)
],
),
);
},
child:
Row
(
children:
<
Widget
>[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
widget
.
title
,
style:
TextStyle
(
fontSize:
25
,
color:
Color
.
fromRGBO
(
1
,
1
,
1
,
0.49411764705882355
)),
),
Text
(
"drücken um das
${widget.title}
zu ändern"
,
style:
TextStyle
(
fontSize:
10
,
color:
Color
.
fromRGBO
(
1
,
1
,
1
,
0.3764705882352941
)),
)
],
),
SizedBox
(
width:
widget
.
xOffset
,
),
Icon
(
Icons
.
keyboard_arrow_right_rounded
,
color:
Color
.
fromRGBO
(
1
,
1
,
1
,
0.49411764705882355
),
size:
40
,
)
],
)
);
}
}
Loading