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
Commits
dea9d537
Commit
dea9d537
authored
2 years ago
by
Anager
Browse files
Options
Downloads
Patches
Plain Diff
settings ui base
parent
431c77cc
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
Home page chaitanya
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lib/bottom_navigation_bar_buttons/settings/settings.dart
+196
-0
196 additions, 0 deletions
lib/bottom_navigation_bar_buttons/settings/settings.dart
lib/main.dart
+2
-1
2 additions, 1 deletion
lib/main.dart
pubspec.lock
+103
-0
103 additions, 0 deletions
pubspec.lock
pubspec.yaml
+1
-0
1 addition, 0 deletions
pubspec.yaml
with
302 additions
and
1 deletion
lib/bottom_navigation_bar_buttons/settings/settings.dart
0 → 100644
+
196
−
0
View file @
dea9d537
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
,
)
],
)
);
}
}
This diff is collapsed.
Click to expand it.
lib/main.dart
+
2
−
1
View file @
dea9d537
...
...
@@ -2,6 +2,7 @@ import 'package:deggendorf_app/bottom_navigation_bar_buttons/weather/current_wea
import
'package:flutter/material.dart'
;
import
'bottom_navigation_bar_buttons/forum/forum.dart'
;
import
'bottom_navigation_bar_buttons/settings/settings.dart'
;
void
main
()
{
runApp
(
const
MyApp
());
...
...
@@ -51,7 +52,7 @@ class _MyHomePageState extends State<MyHomePage> {
//Index: 3
SecondRoute
(),
//Index: 4
Se
condRoute
()
Se
ttingScreen
()
,
];
void
_onItemTapped
(
int
index
)
{
...
...
This diff is collapsed.
Click to expand it.
pubspec.lock
+
103
−
0
View file @
dea9d537
...
...
@@ -90,11 +90,30 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
flutter_material_color_picker:
dependency: transitive
description:
name: flutter_material_color_picker
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0+2"
flutter_settings_screens:
dependency: "direct main"
description:
name: flutter_settings_screens
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.2+1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
google_fonts:
dependency: "direct dev"
description:
...
...
@@ -116,6 +135,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
lints:
dependency: transitive
description:
...
...
@@ -144,6 +170,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path:
dependency: transitive
description:
...
...
@@ -200,6 +233,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.1"
platform:
dependency: transitive
description:
...
...
@@ -221,6 +261,69 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
provider:
dependency: transitive
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0"
shared_preferences:
dependency: transitive
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
shared_preferences_ios:
dependency: transitive
description:
name: shared_preferences_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
sky_engine:
dependency: transitive
description: flutter
...
...
This diff is collapsed.
Click to expand it.
pubspec.yaml
+
1
−
0
View file @
dea9d537
...
...
@@ -36,6 +36,7 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons
:
^1.0.4
http
:
^0.13.4
flutter_settings_screens
:
^0.2.2+1
dev_dependencies
:
flutter_test
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment