Merge branch 'development' into 'master'

Development

See merge request Cloud_Solution/driver-app!34
setting_page
Mohammad Aljammal 6 years ago
commit 6143aeb700

@ -12,6 +12,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../base/base_view.dart'; import '../base/base_view.dart';
import 'package:driverapp/config/shared_pref_kay.dart';
class DashboardScreen extends StatefulWidget { class DashboardScreen extends StatefulWidget {
@override @override
@ -95,14 +96,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0), padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Container( child: Container(
height: MediaQuery height: MediaQuery.of(context).size.height * 0.16,
.of(context) width: MediaQuery.of(context).size.width * 0.44,
.size
.height * 0.16,
width: MediaQuery
.of(context)
.size
.width * 0.44,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0), borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient( gradient: LinearGradient(
@ -114,9 +109,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
child: Padding( child: Padding(
padding: EdgeInsets.all(2.0), padding: EdgeInsets.all(2.0),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceEvenly, MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
Text( Text(
'You Have', 'You Have',
@ -150,20 +145,16 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/closed_box.png', 'assets/images/closed_box.png',
height: MediaQuery height:
.of(context) MediaQuery.of(context).size.height *
.size
.height *
0.10, 0.10,
width: MediaQuery width:
.of(context) MediaQuery.of(context).size.width *
.size
.width *
0.20, 0.20,
scale: 0.9, scale: 0.9,
fit: BoxFit.cover, fit: BoxFit.contain,
), ),
], ],
), ),
@ -183,10 +174,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
padding: EdgeInsets.symmetric(horizontal: 10.0), padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.16, height: MediaQuery.of(context).size.height * 0.16,
width: MediaQuery width: MediaQuery.of(context).size.width * 0.45,
.of(context)
.size
.width * 0.45,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0), borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient( gradient: LinearGradient(
@ -198,21 +186,23 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
child: Padding( child: Padding(
padding: EdgeInsets.all(2.0), padding: EdgeInsets.all(2.0),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceEvenly, MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
Text( Text(
'You Have', 'You Have',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 10.0), color: Colors.white,
), fontSize: 10.0),
Text( ),
'25', Text(
style: TextStyle( '25',
color: Colors.white, fontSize: 25.0), style: TextStyle(
), color: Colors.white,
Text( fontSize: 25.0),
),
Text(
'Succesful\nDeliveries', 'Succesful\nDeliveries',
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
@ -242,7 +232,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
MediaQuery.of(context).size.width * MediaQuery.of(context).size.width *
0.20, 0.20,
scale: 0.9, scale: 0.9,
fit: BoxFit.cover, fit: BoxFit.contain,
), ),
], ],
), ),
@ -264,14 +254,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
child: InkWell( child: InkWell(
child: Container( child: Container(
height: MediaQuery height: MediaQuery.of(context).size.height * 0.18,
.of(context) width: MediaQuery.of(context).size.width * 0.50,
.size
.height * 0.18,
width: MediaQuery
.of(context)
.size
.width * 0.50,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0), borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(colors: [ gradient: LinearGradient(colors: [
@ -287,44 +271,41 @@ class _DashboardScreenState extends State<DashboardScreen> {
Image.asset( Image.asset(
'assets/images/qr_code.png', 'assets/images/qr_code.png',
width: width:
MediaQuery MediaQuery.of(context).size.width * 0.26,
.of(context)
.size
.width * 0.26,
height: height:
MediaQuery MediaQuery.of(context).size.height * 0.14,
.of(context)
.size
.height * 0.14,
fit: BoxFit.contain, fit: BoxFit.contain,
) )
], ],
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap: () { onTap: () {
_scanQrAndGetPatient(context, model); _scanQrAndGetPatient(context, model);
}, },
child: Text( child: Padding(
'SCAN', padding: EdgeInsets.only(top: 8.0),
style: TextStyle( child: Text(
fontSize: 35.0, 'SCAN',
color: Colors.white, style: TextStyle(
fontWeight: FontWeight.w400), fontSize: 35.0,
color: Colors.white,
fontWeight: FontWeight.w400),
),
), ),
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 6.0), padding: EdgeInsets.only(top: 0.0),
child: Text( child: Text(
'To add package to que ', 'To add package to que ',
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 15.0,
color: Colors.white, color: Colors.white,
letterSpacing: 0.5, letterSpacing: 0.2,
wordSpacing: 5.5, wordSpacing: 0.5,
), ),
), ),
), ),
@ -395,6 +376,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
padding: EdgeInsets.symmetric(horizontal: 12.2), padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell( child: InkWell(
child: RoundedContainer( child: RoundedContainer(
raduis: 25.0,
height: MediaQuery.of(context).size.height * 0.109, height: MediaQuery.of(context).size.height * 0.109,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -402,11 +384,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
flex: 1, flex: 1,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 10.0, bottom: 5.0), left: 10.0, bottom: 5.0, top: 10.0),
child: Image.asset( child: Image.asset(
'assets/images/location.png', 'assets/images/location.png',
height: height:
@ -428,7 +410,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only(top: 5.0), padding: EdgeInsets.only(top: 10.0),
child: Text( child: Text(
model.orders[index].firstName + model.orders[index].firstName +
' ' + ' ' +
@ -447,8 +429,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
child: Text( child: Text(
'Olaya ST, Behind kfc next to king , ', 'Olaya ST, Behind kfc next to king , ',
style: style: TextStyle(
TextStyle(color: Colors.black45), color: Color(0xff636363)),
), ),
), ),
], ],
@ -461,11 +443,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: CircleAvatar( child: CircleAvatar(
backgroundColor: Colors.black45, backgroundColor: Color(0xff707070),
radius: 28.0, radius: 28.0,
child: CircleAvatar( child: CircleAvatar(
backgroundColor: Colors.white, backgroundColor: Colors.white,
maxRadius: 25.1, maxRadius: 25.0,
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Text(

@ -34,6 +34,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
padding: EdgeInsets.symmetric(horizontal: 12.2), padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell( child: InkWell(
child: RoundedContainer( child: RoundedContainer(
raduis: 25.0,
height: MediaQuery.of(context).size.height * 0.109, height: MediaQuery.of(context).size.height * 0.109,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -41,11 +42,11 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
Expanded( Expanded(
flex: 1, flex: 1,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 10.0, bottom: 5.0), left: 10.0, bottom: 5.0, top: 10.0),
child: Image.asset( child: Image.asset(
'assets/images/location.png', 'assets/images/location.png',
height: height:
@ -65,7 +66,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only(top: 5.0), padding: EdgeInsets.only(top: 10.0),
child: Text( child: Text(
model.orders[index].firstName + model.orders[index].firstName +
' ' + ' ' +
@ -83,8 +84,9 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
), ),
Expanded( Expanded(
child: Text( child: Text(
'Olaya ST, Behind kfc next to king ,', 'Olaya ST, Behind kfc next to king , ',
style: TextStyle(color: Colors.black45), style:
TextStyle(color: Color(0xff636363)),
), ),
), ),
], ],
@ -101,7 +103,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
radius: 28.0, radius: 28.0,
child: CircleAvatar( child: CircleAvatar(
backgroundColor: Colors.white, backgroundColor: Colors.white,
maxRadius: 24.1, maxRadius: 25.0,
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Text(

Loading…
Cancel
Save