Skip to content

Commit 841a36d

Browse files
committed
settings ui one
1 parent 43592be commit 841a36d

File tree

5 files changed

+198
-0
lines changed

5 files changed

+198
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ The code for Springy Widget is taken and refactored from (https://github.com/mat
142142

143143
<img height="480px" src="screenshots/auth3-1.png"> <img height="480px" src="screenshots/auth3-2.png"> <img height="480px" src="screenshots/login7.png"> <img height="480px" src="screenshots/signup2.png"> <img height="480px" src="screenshots/login6.png"> <img height="480px" src="screenshots/auth2.png"> <img height="480px" src="screenshots/login5.png"> <img height="480px" src="screenshots/auth1.png"> <img height="480px" src="screenshots/login4.png"> <img height="480px" src="screenshots/login1.png"> <img height="480px" src="screenshots/login2.png"> <img height="480px" src="screenshots/login3.gif"> <img height="480px" src="screenshots/signup1.png">
144144

145+
## Settings UIs
146+
147+
<img height="480px" src="screenshots/settings1.png">
148+
145149
## Motorbike App UIs
146150
<img height="480px" src="screenshots/bike1.png"> <img height="480px" src="screenshots/bike2.png">
147151

lib/core/presentation/routes.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import 'package:flutter_ui_challenges/src/pages/food/cake.dart';
1515
import 'package:flutter_ui_challenges/src/pages/misc/image_popup.dart';
1616
import 'package:flutter_ui_challenges/src/pages/misc/musicplayer.dart';
1717
import 'package:flutter_ui_challenges/src/pages/onboarding/intro6.dart';
18+
import 'package:flutter_ui_challenges/src/pages/settings/settings1.dart';
1819
import 'package:flutter_ui_challenges/src/pages/todo/todo_home3.dart';
1920
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
2021
import 'package:flutter_ui_challenges/src/pages/todo/todo2.dart';
@@ -134,6 +135,10 @@ final List<dynamic> pages = [
134135
SubMenuItem("Signup One", SignupOnePage(), path: SignupOnePage.path),
135136
SubMenuItem("Signup Two", SignupTwoPage(), path: SignupTwoPage.path),
136137
]),
138+
MenuItem(title: "Settings",icon: Icons.dashboard,items: [
139+
SubMenuItem("Settings One", SettingsOnePage(),
140+
path: SettingsOnePage.path),
141+
]),
137142
MenuItem(title: "Motorbike App", icon: Icons.list, items: [
138143
SubMenuItem("Home Page", BikeHomePage(), path: BikeHomePage.path),
139144
SubMenuItem("Bike Details Page", BikeDetailsPage(), path: BikeDetailsPage.path),

lib/src/pages/settings/settings1.dart

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
import 'package:cached_network_image/cached_network_image.dart';
2+
/**
3+
* Author: Damodar Lohani
4+
* profile: https://github.com/lohanidamodar
5+
*/
6+
7+
import 'package:flutter/material.dart';
8+
import 'package:flutter_ui_challenges/core/presentation/res/assets.dart';
9+
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
10+
11+
class SettingsOnePage extends StatelessWidget {
12+
static final String path = "lib/src/pages/settings/settings1.dart";
13+
@override
14+
Widget build(BuildContext context) {
15+
return Scaffold(
16+
backgroundColor: Colors.grey.shade200,
17+
appBar: AppBar(
18+
elevation: 0,
19+
brightness: Brightness.light,
20+
iconTheme: IconThemeData(color: Colors.black),
21+
backgroundColor: Colors.grey.shade200,
22+
title: Text(
23+
'Settings',
24+
style: TextStyle(color: Colors.black),
25+
),
26+
),
27+
body: Stack(
28+
fit: StackFit.expand,
29+
children: <Widget>[
30+
SingleChildScrollView(
31+
padding: const EdgeInsets.all(16.0),
32+
child: Column(
33+
crossAxisAlignment: CrossAxisAlignment.start,
34+
children: <Widget>[
35+
Card(
36+
elevation: 8.0,
37+
shape: RoundedRectangleBorder(
38+
borderRadius: BorderRadius.circular(10.0)),
39+
color: Colors.purple,
40+
child: ListTile(
41+
onTap: () {
42+
//open edit profile
43+
},
44+
title: Text(
45+
"John Doe",
46+
style: TextStyle(
47+
color: Colors.white,
48+
fontWeight: FontWeight.w500,
49+
),
50+
),
51+
leading: CircleAvatar(
52+
backgroundImage: CachedNetworkImageProvider(avatars[0]),
53+
),
54+
trailing: Icon(
55+
Icons.edit,
56+
color: Colors.white,
57+
),
58+
),
59+
),
60+
const SizedBox(height: 10.0),
61+
Card(
62+
elevation: 4.0,
63+
margin: const EdgeInsets.fromLTRB(32.0, 8.0, 32.0, 16.0),
64+
shape: RoundedRectangleBorder(
65+
borderRadius: BorderRadius.circular(10.0)),
66+
child: Column(
67+
children: <Widget>[
68+
ListTile(
69+
leading: Icon(
70+
Icons.lock_outline,
71+
color: Colors.purple,
72+
),
73+
title: Text("Change Password"),
74+
trailing: Icon(Icons.keyboard_arrow_right),
75+
onTap: () {
76+
//open change password
77+
},
78+
),
79+
_buildDivider(),
80+
ListTile(
81+
leading: Icon(
82+
FontAwesomeIcons.language,
83+
color: Colors.purple,
84+
),
85+
title: Text("Change Language"),
86+
trailing: Icon(Icons.keyboard_arrow_right),
87+
onTap: () {
88+
//open change language
89+
},
90+
),
91+
_buildDivider(),
92+
ListTile(
93+
leading: Icon(
94+
Icons.location_on,
95+
color: Colors.purple,
96+
),
97+
title: Text("Change Location"),
98+
trailing: Icon(Icons.keyboard_arrow_right),
99+
onTap: () {
100+
//open change location
101+
},
102+
),
103+
],
104+
),
105+
),
106+
const SizedBox(height: 20.0),
107+
Text(
108+
"Notification Settings",
109+
style: TextStyle(
110+
fontSize: 20.0,
111+
fontWeight: FontWeight.bold,
112+
color: Colors.indigo,
113+
),
114+
),
115+
SwitchListTile(
116+
activeColor: Colors.purple,
117+
contentPadding: const EdgeInsets.all(0),
118+
value: true,
119+
title: Text("Received notification"),
120+
onChanged: (val) {},
121+
),
122+
SwitchListTile(
123+
activeColor: Colors.purple,
124+
contentPadding: const EdgeInsets.all(0),
125+
value: false,
126+
title: Text("Received newsletter"),
127+
onChanged: null,
128+
),
129+
SwitchListTile(
130+
activeColor: Colors.purple,
131+
contentPadding: const EdgeInsets.all(0),
132+
value: true,
133+
title: Text("Received Offer Notification"),
134+
onChanged: (val) {},
135+
),
136+
SwitchListTile(
137+
activeColor: Colors.purple,
138+
contentPadding: const EdgeInsets.all(0),
139+
value: true,
140+
title: Text("Received App Updates"),
141+
onChanged: null,
142+
),
143+
const SizedBox(height: 60.0),
144+
],
145+
),
146+
),
147+
Positioned(
148+
bottom: -20,
149+
left: -20,
150+
child: Container(
151+
width: 80,
152+
height: 80,
153+
alignment: Alignment.center,
154+
decoration: BoxDecoration(
155+
color: Colors.purple,
156+
shape: BoxShape.circle,
157+
),
158+
),
159+
),
160+
Positioned(
161+
bottom: 00,
162+
left: 00,
163+
child: IconButton(
164+
icon: Icon(
165+
FontAwesomeIcons.powerOff,
166+
color: Colors.white,
167+
),
168+
onPressed: () {
169+
//log out
170+
},
171+
),
172+
)
173+
],
174+
),
175+
);
176+
}
177+
178+
Container _buildDivider() {
179+
return Container(
180+
margin: const EdgeInsets.symmetric(
181+
horizontal: 8.0,
182+
),
183+
width: double.infinity,
184+
height: 1.0,
185+
color: Colors.grey.shade400,
186+
);
187+
}
188+
}

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ flutter:
8888
- lib/src/pages/profile/
8989
- lib/src/pages/quiz_app/
9090
- lib/src/pages/todo/
91+
- lib/src/pages/settings/
9192
- lib/src/pages/travel/
9293
- lib/src/pages/invitation/
9394
# - images/a_dot_burr.jpeg

screenshots/settings1.png

149 KB
Loading

0 commit comments

Comments
 (0)