diff --git a/lib/pages/dashboard/dashboard_screen.dart b/lib/pages/dashboard/dashboard_screen.dart index c7068d8..460bce7 100644 --- a/lib/pages/dashboard/dashboard_screen.dart +++ b/lib/pages/dashboard/dashboard_screen.dart @@ -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/pages/delivery/information_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/translations_delegate_base.dart'; import 'package:driverapp/uitl/utils.dart'; @@ -49,73 +50,83 @@ class _DashboardScreenState extends State { body: Container( height: MediaQuery.of(context).size.height * .95, child: ListView( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Padding( - padding: EdgeInsets.all(16.0), - child: Column( - children: [ - SafeArea( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - 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( + Padding( + padding: EdgeInsets.all(16.0), + child: Column( + children: [ + SafeArea( child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - 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, - ), + 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, + //model.user.userName, + style: TextStyle( + fontWeight: FontWeight.w400, + fontSize: 25.0), ), ), ], ), ), + ], + ), + ), + Padding( + padding: EdgeInsets.all(16.0), + child: SafeArea( + child: Column( + children: [ + 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: [ - Expanded( - child: Column( - children: [ - Padding( - padding: EdgeInsets.symmetric(horizontal: 10.0), - child: Container( - height: MediaQuery.of(context).orientation == + ], + ), + Row( + children: [ + Expanded( + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Container( + height: MediaQuery.of(context).orientation == Orientation.portrait ? MediaQuery.of(context).size.height * 0.16 : MediaQuery.of(context).size.height * 0.30, diff --git a/lib/pages/setting/setting.dart b/lib/pages/setting/setting.dart new file mode 100644 index 0000000..7ea5f37 --- /dev/null +++ b/lib/pages/setting/setting.dart @@ -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: [ + Container( + width: double.infinity, + child: Column( + children: [ + 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: [ + InkWell( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 15), + child: Row( + children: [ + 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: [ + Container( + margin: EdgeInsets.only(left: 15), + child: Row( + children: [ + 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, + ), + ), + ), + ], + ), + ), + ], + ), + ), + ], + ), + ); + } +} \ No newline at end of file