|
|
|
|
@ -12,6 +12,7 @@ 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
|
|
|
|
|
@ -95,14 +96,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(
|
|
|
|
|
@ -114,9 +109,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',
|
|
|
|
|
@ -150,20 +145,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,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -183,10 +174,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(
|
|
|
|
|
@ -198,21 +186,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,
|
|
|
|
|
@ -242,7 +232,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
MediaQuery.of(context).size.width *
|
|
|
|
|
0.20,
|
|
|
|
|
scale: 0.9,
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -264,14 +254,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: [
|
|
|
|
|
@ -287,44 +271,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,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -395,6 +376,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
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,
|
|
|
|
|
@ -402,11 +384,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
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:
|
|
|
|
|
@ -428,7 +410,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(top: 5.0),
|
|
|
|
|
padding: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
model.orders[index].firstName +
|
|
|
|
|
' ' +
|
|
|
|
|
@ -447,8 +429,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)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -461,11 +443,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(
|
|
|
|
|
|