-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SettingsScreen > ProfileScreen
- Loading branch information
Showing
3 changed files
with
252 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import 'package:WhatsApp/models/chat_model.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class ProfileSettingScreen extends StatefulWidget { | ||
@override | ||
_ProfileSettingScreenState createState() => _ProfileSettingScreenState(); | ||
} | ||
|
||
class _ProfileSettingScreenState extends State<ProfileSettingScreen> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
backgroundColor: Colors.white, | ||
resizeToAvoidBottomPadding: true, | ||
appBar: AppBar( | ||
title: Row( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: [ | ||
Text( | ||
"Profile", | ||
style: TextStyle(fontSize: 24.0), | ||
), | ||
], | ||
), | ||
), | ||
body: ListView( | ||
children: <Widget>[ | ||
Container( | ||
padding: EdgeInsets.symmetric(vertical: 20.0), | ||
alignment: Alignment.center, | ||
child: Stack( | ||
alignment: Alignment.bottomRight, | ||
children: <Widget>[ | ||
GestureDetector( | ||
child: CircleAvatar( | ||
foregroundColor: Theme.of(context).primaryColor, | ||
backgroundColor: Colors.grey, | ||
backgroundImage: AssetImage(dummyData[2].avatarUrl), | ||
radius: 80.0, | ||
), | ||
onTap: () {}, | ||
), | ||
Positioned( | ||
child: GestureDetector( | ||
onTap: () {}, | ||
child: Container( | ||
width: 50.0, | ||
height: 50.0, | ||
child: FloatingActionButton( | ||
mini: true, | ||
shape: StadiumBorder(), | ||
onPressed: null, | ||
backgroundColor: Theme.of(context).primaryColor, | ||
child: Icon( | ||
Icons.camera_alt, | ||
color: Colors.white, | ||
size: 23.0, | ||
), | ||
), | ||
), | ||
)), | ||
], | ||
), | ||
), | ||
ListTile( | ||
leading: | ||
IconButton(icon: Icon(Icons.person, color: Color(0xFF6CB3A7))), | ||
title: Text("Name", | ||
style: TextStyle(fontSize: 14.0, color: Colors.grey[600])), | ||
subtitle: Text("Shivam Goyal", | ||
style: TextStyle(fontSize: 16.0, color: Colors.black)), | ||
trailing: | ||
IconButton(icon: Icon(Icons.edit, color: Colors.grey[400])), | ||
onTap: () {}, | ||
), | ||
Container( | ||
alignment: Alignment.centerRight, | ||
child: Divider(height: 0.0), | ||
padding: EdgeInsets.only(left: 80.0), | ||
), | ||
ListTile( | ||
leading: IconButton( | ||
icon: Icon(Icons.info_outline, color: Color(0xFF6CB3A7))), | ||
title: Text("About", | ||
style: TextStyle(fontSize: 14.0, color: Colors.grey[600])), | ||
subtitle: Text("Hey there! I'm using WhatsApp.", | ||
style: TextStyle(fontSize: 16.0, color: Colors.black)), | ||
onTap: () {}, | ||
trailing: | ||
IconButton(icon: Icon(Icons.edit, color: Colors.grey[400])), | ||
), | ||
Container( | ||
alignment: Alignment.centerRight, | ||
child: Divider(height: 0.0), | ||
padding: EdgeInsets.only(left: 80.0), | ||
), | ||
ListTile( | ||
leading: | ||
IconButton(icon: Icon(Icons.phone, color: Color(0xFF6CB3A7))), | ||
title: Text("Phone", | ||
style: TextStyle(fontSize: 14.0, color: Colors.grey[600])), | ||
subtitle: Text("+91 90122 18994", | ||
style: TextStyle(fontSize: 16.0, color: Colors.black)), | ||
onTap: () {}, | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import 'package:WhatsApp/models/chat_model.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'ProfileSettingScreen.dart'; | ||
|
||
class SettingMainScreen extends StatefulWidget { | ||
@override | ||
_SettingMainScreenState createState() => _SettingMainScreenState(); | ||
} | ||
|
||
class _SettingMainScreenState extends State<SettingMainScreen> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
backgroundColor: Colors.white, | ||
resizeToAvoidBottomPadding: true, | ||
appBar: AppBar( | ||
title: Row( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: [ | ||
Text( | ||
"Settings", | ||
style: TextStyle(fontSize: 24.0), | ||
), | ||
], | ||
), | ||
), | ||
body: ListView( | ||
children: <Widget>[ | ||
Container( | ||
height: 100.0, | ||
child: ListTile( | ||
contentPadding: EdgeInsets.only( | ||
top: 15.0, bottom: 15.0, left: 20.0, right: 20.0), | ||
leading: CircleAvatar( | ||
backgroundImage: AssetImage(dummyData[2].avatarUrl), | ||
radius: 25.0, | ||
), | ||
title: Text( | ||
"Shivam Goyal", | ||
style: TextStyle(fontSize: 20.0), | ||
), | ||
subtitle: Text("Hey there! I'm using WhatsApp."), | ||
onTap: () { | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute( | ||
builder: (context) => | ||
ProfileSettingScreen()), // MessageScreen(i) | ||
); | ||
}, | ||
), | ||
), | ||
Divider(height: 0.0), | ||
ListTile( | ||
leading: | ||
IconButton(icon: Icon(Icons.vpn_key, color: Color(0xFF6CB3A7))), | ||
title: Text("Account"), | ||
subtitle: Text("Privacy, security, change number"), | ||
onTap: () {}, | ||
), | ||
ListTile( | ||
leading: | ||
IconButton(icon: Icon(Icons.chat, color: Color(0xFF6CB3A7))), | ||
title: Text("Chats"), | ||
subtitle: Text("Backup, history, wallpaper"), | ||
onTap: () {}, | ||
), | ||
ListTile( | ||
leading: IconButton( | ||
icon: Icon(Icons.notifications, color: Color(0xFF6CB3A7))), | ||
title: Text("Notifications"), | ||
subtitle: Text("Message, group & call tones"), | ||
onTap: () {}, | ||
), | ||
ListTile( | ||
leading: IconButton( | ||
icon: Icon(Icons.data_usage, color: Color(0xFF6CB3A7))), | ||
title: Text("Data and storage usage"), | ||
subtitle: Text("Network usage, auto-download"), | ||
onTap: () {}, | ||
), | ||
ListTile( | ||
leading: IconButton( | ||
icon: Icon(Icons.help_outline, color: Color(0xFF6CB3A7))), | ||
title: Text("Help"), | ||
subtitle: Text("FAQ, contact us, privacy policy"), | ||
onTap: () {}, | ||
), | ||
Container( | ||
alignment: Alignment.centerRight, | ||
child: Divider(), | ||
padding: EdgeInsets.only(left: 80.0), | ||
), | ||
ListTile( | ||
leading: | ||
IconButton(icon: Icon(Icons.people, color: Color(0xFF6CB3A7))), | ||
title: Text("Invite a friend"), | ||
onTap: () {}, | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters