dashboard design update

logut
hussam al-habibeh 6 years ago
parent a4b593f9c4
commit 3bd4f17d57

@ -9,8 +9,8 @@ import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:driverapp/widgets/others/rounded_container.dart'; import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:flutter/cupertino.dart'; 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
@ -94,14 +94,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(
@ -113,9 +107,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',
@ -149,20 +143,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,
), ),
], ],
), ),
@ -182,10 +172,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(
@ -197,21 +184,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,
@ -241,7 +230,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,
), ),
], ],
), ),
@ -263,14 +252,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: [
@ -286,44 +269,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,
), ),
), ),
), ),
@ -372,10 +352,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
], ],
), ),
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => OrdersListScreen()), builder: (context) => OrdersListScreen()),
)), )),
], ],
), ),
], ],
@ -392,21 +372,19 @@ 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(
height: MediaQuery raduis: 25.0,
.of(context) height: MediaQuery.of(context).size.height * 0.109,
.size
.height * 0.109,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
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:
@ -426,7 +404,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
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 +
' ' + ' ' +
@ -445,7 +423,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: TextStyle(color: Colors.black45), style:
TextStyle(color: Color(0xff636363)),
), ),
), ),
], ],
@ -458,11 +437,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(

@ -20,7 +20,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
Scaffold( Scaffold(
appBar: AppBar( appBar: AppBar(
centerTitle: true, centerTitle: true,
backgroundColor: Color(0xffF4F9FA), backgroundColor: Color(0xffEFF5F5),
title: Text( title: Text(
'Your Delivery Que', 'Your Delivery Que',
), ),
@ -37,6 +37,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,
@ -44,11 +45,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:
@ -68,7 +69,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 +
' ' + ' ' +
@ -86,8 +87,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)),
), ),
), ),
], ],
@ -104,7 +106,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