add setting page in setting_branch

setting_branch
enadhilal 6 years ago
commit 6ecda69726

@ -6,6 +6,7 @@ import 'package:driverapp/core/viewModels/authentication_view_model.dart';
import 'package:driverapp/core/viewModels/orders_view_model.dart'; import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/delivery/information_page.dart'; import 'package:driverapp/pages/delivery/information_page.dart';
import 'package:driverapp/pages/orders/pending_orders_page.dart'; import 'package:driverapp/pages/orders/pending_orders_page.dart';
import 'package:driverapp/pages/setting/setting.dart';
import 'package:driverapp/uitl/app_toast.dart'; import 'package:driverapp/uitl/app_toast.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart'; import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/uitl/utils.dart'; import 'package:driverapp/uitl/utils.dart';
@ -49,73 +50,83 @@ class _DashboardScreenState extends State<DashboardScreen> {
body: Container( body: Container(
height: MediaQuery.of(context).size.height * .95, height: MediaQuery.of(context).size.height * .95,
child: ListView( child: ListView(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Row( Padding(
mainAxisAlignment: MainAxisAlignment.spaceBetween, padding: EdgeInsets.all(16.0),
children: <Widget>[ child: Column(
Padding( children: <Widget>[
padding: EdgeInsets.all(16.0), SafeArea(
child: Column(
children: <Widget>[
SafeArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
TranslationBase.of(context).haveGreatDay,
style: TextStyle(
fontSize: 14.5,
color: Color(0xff636363),
fontWeight: FontWeight.w300),
),
Padding(
padding: EdgeInsets.only(top: 4.5),
child: Text(
_authenticationViewModel.user.userName,
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 25.0),
),
),
],
),
),
],
),
),
Padding(
padding: EdgeInsets.all(16.0),
child: SafeArea(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
CircleAvatar( Text(
radius: 25.5, TranslationBase.of(context).haveGreatDay,
backgroundColor: Color(0xff30B7B9), style: TextStyle(
child: CircleAvatar( fontSize: 14.5,
backgroundColor: Color(0xff30B7B9), color: Color(0xff636363),
maxRadius: 26.0, fontWeight: FontWeight.w300),
child: Image.asset( ),
'assets/images/driver.png', Padding(
fit: BoxFit.contain, padding: EdgeInsets.only(top: 4.5),
), child: Text(
_authenticationViewModel.user.userName,
//model.user.userName,
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 25.0),
), ),
), ),
], ],
), ),
), ),
],
),
),
Padding(
padding: EdgeInsets.all(16.0),
child: SafeArea(
child: Column(
children: <Widget>[
InkWell(
child: CircleAvatar(
radius: 25.5,
backgroundColor: Color(0xff30B7B9),
child: CircleAvatar(
backgroundColor: Color(0xff30B7B9),
maxRadius: 26.0,
child: Image.asset(
'assets/images/driver.png',
fit: BoxFit.contain,
),
),
),
onTap: (){
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
SettingPage()));
},
),
],
), ),
], ),
), ),
Row( ],
children: <Widget>[ ),
Expanded( Row(
child: Column( children: <Widget>[
children: <Widget>[ Expanded(
Padding( child: Column(
padding: EdgeInsets.symmetric(horizontal: 10.0), children: <Widget>[
child: Container( Padding(
height: MediaQuery.of(context).orientation == padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Container(
height: MediaQuery.of(context).orientation ==
Orientation.portrait Orientation.portrait
? MediaQuery.of(context).size.height * 0.16 ? MediaQuery.of(context).size.height * 0.16
: MediaQuery.of(context).size.height * 0.30, : MediaQuery.of(context).size.height * 0.30,

@ -0,0 +1,127 @@
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class SettingPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarColor: Color(0xff30B7B9),
arrowColor: Colors.white,
titleColor: Colors.white,
body: Column(
children: <Widget>[
Container(
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width * 0.7,
child: CircleAvatar(
radius: 25.5,
backgroundColor: Theme.of(context).primaryColor,
child: CircleAvatar(
backgroundColor: Theme.of(context).primaryColor,
maxRadius: 200.0,
child: Image.asset(
'assets/images/driver.png',
height: 280,
width: 280,
fit: BoxFit.contain,
),
),
),
),
SizedBox(height: 10,),
Container(
child: Text('Driver Name', style: TextStyle(fontSize: 40, fontWeight: FontWeight.w600, color: Colors.white),),
),
SizedBox(height: 10,),
Container(
child: Text('ID: 123456789', style: TextStyle(fontSize: 20, color: Colors.white),),
),
],
),
),
SizedBox(height: 50,),
Container(
margin: EdgeInsets.only(left: 35),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
InkWell(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15),
child: Row(
children: <Widget>[
Icon(
Icons.input,
size: 40,
color: Colors.white,
),
SizedBox(width: 20,),
Text('Log out', style: TextStyle(fontWeight: FontWeight.w500, color: Colors.white, fontSize: 18),),
],
),
),
SizedBox(
height: 10.0,
child: Center(
child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30),
height: 1.0,
color: Colors.white,
),
),
),
],
),
),
SizedBox(height: 8,),
InkWell(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15),
child: Row(
children: <Widget>[
Icon(
Icons.settings,
size: 40,
color: Colors.white,
),
SizedBox(width: 20,),
Text('Settings', style: TextStyle(fontWeight: FontWeight.w500, color: Colors.white, fontSize: 18),),
],
),
),
SizedBox(
height: 10.0,
child: Center(
child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30),
height: 1.0,
color: Colors.white,
),
),
),
],
),
),
],
),
),
],
),
);
}
}
Loading…
Cancel
Save