dashboard design update

logut
hussam al-habibeh 5 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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../base/base_view.dart';
import 'package:driverapp/config/shared_pref_kay.dart';
class DashboardScreen extends StatefulWidget {
@override
@ -94,14 +94,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Padding(
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Container(
height: MediaQuery
.of(context)
.size
.height * 0.16,
width: MediaQuery
.of(context)
.size
.width * 0.44,
height: MediaQuery.of(context).size.height * 0.16,
width: MediaQuery.of(context).size.width * 0.44,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(
@ -113,9 +107,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded(
child: Padding(
padding: EdgeInsets.all(2.0),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: <Widget>[
Text(
'You Have',
@ -149,20 +143,16 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/closed_box.png',
height: MediaQuery
.of(context)
.size
.height *
Image.asset(
'assets/images/closed_box.png',
height:
MediaQuery.of(context).size.height *
0.10,
width: MediaQuery
.of(context)
.size
.width *
width:
MediaQuery.of(context).size.width *
0.20,
scale: 0.9,
fit: BoxFit.cover,
fit: BoxFit.contain,
),
],
),
@ -182,10 +172,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Container(
height: MediaQuery.of(context).size.height * 0.16,
width: MediaQuery
.of(context)
.size
.width * 0.45,
width: MediaQuery.of(context).size.width * 0.45,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(
@ -197,21 +184,23 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded(
child: Padding(
padding: EdgeInsets.all(2.0),
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: <Widget>[
Text(
'You Have',
style: TextStyle(
color: Colors.white, fontSize: 10.0),
),
Text(
'25',
style: TextStyle(
color: Colors.white, fontSize: 25.0),
),
Text(
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: <Widget>[
Text(
'You Have',
style: TextStyle(
color: Colors.white,
fontSize: 10.0),
),
Text(
'25',
style: TextStyle(
color: Colors.white,
fontSize: 25.0),
),
Text(
'Succesful\nDeliveries',
style: TextStyle(
color: Colors.white,
@ -241,7 +230,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
MediaQuery.of(context).size.width *
0.20,
scale: 0.9,
fit: BoxFit.cover,
fit: BoxFit.contain,
),
],
),
@ -263,14 +252,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded(
child: InkWell(
child: Container(
height: MediaQuery
.of(context)
.size
.height * 0.18,
width: MediaQuery
.of(context)
.size
.width * 0.50,
height: MediaQuery.of(context).size.height * 0.18,
width: MediaQuery.of(context).size.width * 0.50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
gradient: LinearGradient(colors: [
@ -286,44 +269,41 @@ class _DashboardScreenState extends State<DashboardScreen> {
Image.asset(
'assets/images/qr_code.png',
width:
MediaQuery
.of(context)
.size
.width * 0.26,
MediaQuery.of(context).size.width * 0.26,
height:
MediaQuery
.of(context)
.size
.height * 0.14,
MediaQuery.of(context).size.height * 0.14,
fit: BoxFit.contain,
)
],
),
Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
InkWell(
onTap: () {
_scanQrAndGetPatient(context, model);
},
child: Text(
'SCAN',
style: TextStyle(
fontSize: 35.0,
color: Colors.white,
fontWeight: FontWeight.w400),
child: Padding(
padding: EdgeInsets.only(top: 8.0),
child: Text(
'SCAN',
style: TextStyle(
fontSize: 35.0,
color: Colors.white,
fontWeight: FontWeight.w400),
),
),
),
Padding(
padding: EdgeInsets.only(top: 6.0),
padding: EdgeInsets.only(top: 0.0),
child: Text(
'To add package to que ',
style: TextStyle(
fontSize: 12.0,
fontSize: 15.0,
color: Colors.white,
letterSpacing: 0.5,
wordSpacing: 5.5,
letterSpacing: 0.2,
wordSpacing: 0.5,
),
),
),
@ -372,10 +352,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
],
),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => OrdersListScreen()),
)),
context,
MaterialPageRoute(
builder: (context) => OrdersListScreen()),
)),
],
),
],
@ -392,21 +372,19 @@ class _DashboardScreenState extends State<DashboardScreen> {
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell(
child: RoundedContainer(
height: MediaQuery
.of(context)
.size
.height * 0.109,
raduis: 25.0,
height: MediaQuery.of(context).size.height * 0.109,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 10.0, bottom: 5.0),
left: 10.0, bottom: 5.0, top: 10.0),
child: Image.asset(
'assets/images/location.png',
height:
@ -426,7 +404,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 5.0),
padding: EdgeInsets.only(top: 10.0),
child: Text(
model.orders[index].firstName +
' ' +
@ -445,7 +423,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded(
child: Text(
'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>[
Expanded(
child: CircleAvatar(
backgroundColor: Colors.black45,
backgroundColor: Color(0xff707070),
radius: 28.0,
child: CircleAvatar(
backgroundColor: Colors.white,
maxRadius: 25.1,
maxRadius: 25.0,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(

@ -20,7 +20,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
Scaffold(
appBar: AppBar(
centerTitle: true,
backgroundColor: Color(0xffF4F9FA),
backgroundColor: Color(0xffEFF5F5),
title: Text(
'Your Delivery Que',
),
@ -37,6 +37,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell(
child: RoundedContainer(
raduis: 25.0,
height: MediaQuery.of(context).size.height * 0.109,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -44,11 +45,11 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(
left: 10.0, bottom: 5.0),
left: 10.0, bottom: 5.0, top: 10.0),
child: Image.asset(
'assets/images/location.png',
height:
@ -68,7 +69,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 5.0),
padding: EdgeInsets.only(top: 10.0),
child: Text(
model.orders[index].firstName +
' ' +
@ -86,8 +87,9 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
),
Expanded(
child: Text(
'Olaya ST, Behind kfc next to king ,',
style: TextStyle(color: Colors.black45),
'Olaya ST, Behind kfc next to king , ',
style:
TextStyle(color: Color(0xff636363)),
),
),
],
@ -104,7 +106,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
radius: 28.0,
child: CircleAvatar(
backgroundColor: Colors.white,
maxRadius: 24.1,
maxRadius: 25.0,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(

Loading…
Cancel
Save