|
|
|
@ -1,6 +1,8 @@
|
|
|
|
import 'package:barcode_scan/platform_wrapper.dart';
|
|
|
|
import 'package:barcode_scan/platform_wrapper.dart';
|
|
|
|
|
|
|
|
import 'package:driverapp/config/size_config.dart';
|
|
|
|
import 'package:driverapp/core/enum/viewstate.dart';
|
|
|
|
import 'package:driverapp/core/enum/viewstate.dart';
|
|
|
|
import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';
|
|
|
|
import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';
|
|
|
|
|
|
|
|
import 'package:driverapp/core/viewModels/authentication_view_model.dart';
|
|
|
|
import 'package:driverapp/core/viewModels/orders_view_model.dart';
|
|
|
|
import 'package:driverapp/core/viewModels/orders_view_model.dart';
|
|
|
|
import 'package:driverapp/pages/delivery/information_page.dart';
|
|
|
|
import 'package:driverapp/pages/delivery/information_page.dart';
|
|
|
|
import 'package:driverapp/pages/orders/pending_orders_page.dart';
|
|
|
|
import 'package:driverapp/pages/orders/pending_orders_page.dart';
|
|
|
|
@ -14,7 +16,8 @@ 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 'package:hexcolor/hexcolor.dart';
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
import 'package:driverapp/config/size_config.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../base/base_view.dart';
|
|
|
|
import '../base/base_view.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class DashboardScreen extends StatefulWidget {
|
|
|
|
class DashboardScreen extends StatefulWidget {
|
|
|
|
@ -23,13 +26,29 @@ class DashboardScreen extends StatefulWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
|
|
|
bool isInit = false;
|
|
|
|
|
|
|
|
AuthenticationViewModel authenticationViewModel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void didChangeDependencies() {
|
|
|
|
|
|
|
|
if (!isInit) {
|
|
|
|
|
|
|
|
authenticationViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
isInit = !isInit;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
super.didChangeDependencies();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
int orderId;
|
|
|
|
int orderId;
|
|
|
|
|
|
|
|
|
|
|
|
return BaseView<OrdersViewModel>(
|
|
|
|
return BaseView<OrdersViewModel>(
|
|
|
|
onModelReady: (model) => model.getPendingOrders(),
|
|
|
|
onModelReady: (model) => model.getPendingOrders(),
|
|
|
|
builder: (BuildContext context, OrdersViewModel model, Widget child) =>
|
|
|
|
builder: (BuildContext context, OrdersViewModel model, Widget child) =>
|
|
|
|
AppScaffold(
|
|
|
|
AppScaffold(
|
|
|
|
|
|
|
|
// baseViewModel: model,
|
|
|
|
body: Container(
|
|
|
|
body: Container(
|
|
|
|
height: MediaQuery.of(context).size.height * .95,
|
|
|
|
height: MediaQuery.of(context).size.height * .95,
|
|
|
|
child: ListView(
|
|
|
|
child: ListView(
|
|
|
|
@ -47,7 +66,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).haveGreatDay,
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.haveGreatDay,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 14.5,
|
|
|
|
fontSize: 14.5,
|
|
|
|
color: Color(0xff636363),
|
|
|
|
color: Color(0xff636363),
|
|
|
|
@ -56,8 +77,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 4.5),
|
|
|
|
padding: EdgeInsets.only(top: 4.5),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'Drive Name',
|
|
|
|
// 'Drive Name',
|
|
|
|
//model.user.userName,
|
|
|
|
authenticationViewModel.user.userName,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 25.0),
|
|
|
|
fontSize: 25.0),
|
|
|
|
@ -100,11 +121,22 @@ 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.of(context).orientation ==
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context).size.height * 0.16
|
|
|
|
? MediaQuery
|
|
|
|
: MediaQuery.of(context).size.height * 0.30,
|
|
|
|
.of(context)
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.16
|
|
|
|
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.30,
|
|
|
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.44,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
@ -113,7 +145,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment
|
|
|
|
|
|
|
|
.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
@ -123,7 +156,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).youHave,
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.youHave,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize:
|
|
|
|
fontSize:
|
|
|
|
@ -139,7 +174,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
4.0),
|
|
|
|
4.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.undeliveredPackages,
|
|
|
|
.undeliveredPackages,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
@ -165,18 +201,22 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/closed_box.png',
|
|
|
|
'assets/images/closed_box.png',
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.orientation ==
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
? MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.10
|
|
|
|
0.10
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.20,
|
|
|
|
0.20,
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.width *
|
|
|
|
.width *
|
|
|
|
0.20,
|
|
|
|
0.20,
|
|
|
|
@ -200,11 +240,22 @@ 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.of(context).orientation ==
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context).size.height * 0.16
|
|
|
|
? MediaQuery
|
|
|
|
: MediaQuery.of(context).size.height * 0.30,
|
|
|
|
.of(context)
|
|
|
|
width: MediaQuery.of(context).size.width * 0.45,
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.16
|
|
|
|
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.30,
|
|
|
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.45,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
@ -213,7 +264,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment
|
|
|
|
|
|
|
|
.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
@ -223,7 +275,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).youHave,
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.youHave,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize:
|
|
|
|
fontSize:
|
|
|
|
@ -239,7 +293,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
4.0),
|
|
|
|
4.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.deliveredPackages,
|
|
|
|
.deliveredPackages,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
@ -265,18 +320,22 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/opend_box.png',
|
|
|
|
'assets/images/opend_box.png',
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.orientation ==
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
? MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.10
|
|
|
|
0.10
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.20,
|
|
|
|
0.20,
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.width *
|
|
|
|
.width *
|
|
|
|
0.20,
|
|
|
|
0.20,
|
|
|
|
@ -297,17 +356,29 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 15.0),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
|
|
|
vertical: 16.0, horizontal: 15.0),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context).size.height * 0.18
|
|
|
|
? MediaQuery
|
|
|
|
: MediaQuery.of(context).size.height * 0.30,
|
|
|
|
.of(context)
|
|
|
|
width: MediaQuery.of(context).size.width * 0.50,
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.18
|
|
|
|
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.30,
|
|
|
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.50,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
gradient: LinearGradient(
|
|
|
|
gradient: LinearGradient(
|
|
|
|
@ -318,21 +389,32 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
mainAxisAlignment: MainAxisAlignment
|
|
|
|
|
|
|
|
.spaceEvenly,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/qr_code.png',
|
|
|
|
'assets/images/qr_code.png',
|
|
|
|
width: MediaQuery.of(context).size.width *
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width *
|
|
|
|
0.26,
|
|
|
|
0.26,
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.orientation ==
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context).size.height *
|
|
|
|
? MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height *
|
|
|
|
0.14
|
|
|
|
0.14
|
|
|
|
: MediaQuery.of(context).size.height *
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height *
|
|
|
|
0.28,
|
|
|
|
0.28,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -341,7 +423,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment
|
|
|
|
|
|
|
|
.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
InkWell(
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -350,7 +433,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(top: 8.0),
|
|
|
|
padding: EdgeInsets.only(top: 8.0),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).scan,
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.scan,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
fontSize:
|
|
|
|
SizeConfig.textMultiplier * 6.0,
|
|
|
|
SizeConfig.textMultiplier * 6.0,
|
|
|
|
@ -363,7 +448,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 0.0),
|
|
|
|
padding: EdgeInsets.only(top: 0.0),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.toAddPackageToQue,
|
|
|
|
.toAddPackageToQue,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
fontSize:
|
|
|
|
@ -395,7 +481,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).nearestDropOffs,
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.nearestDropOffs,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 21.0,
|
|
|
|
fontSize: 21.0,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
@ -410,9 +498,12 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).seeAll,
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.seeAll,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 14.5, color: Color(0xff42B6AD)),
|
|
|
|
fontSize: 14.5,
|
|
|
|
|
|
|
|
color: Color(0xff42B6AD)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Icon(
|
|
|
|
Icon(
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
@ -421,10 +512,12 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
onTap: () =>
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (context) => OrdersListScreen()),
|
|
|
|
builder: (context) =>
|
|
|
|
|
|
|
|
OrdersListScreen()),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -447,17 +540,27 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
child: RoundedContainer(
|
|
|
|
child: RoundedContainer(
|
|
|
|
raduis: 25.0,
|
|
|
|
raduis: 25.0,
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context).size.height * 0.109
|
|
|
|
? MediaQuery
|
|
|
|
: MediaQuery.of(context).size.height * 0.209,
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.109
|
|
|
|
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.209,
|
|
|
|
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.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment
|
|
|
|
|
|
|
|
.start,
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
@ -466,25 +569,31 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
left: 15.0, top: 14.0),
|
|
|
|
left: 15.0, top: 14.0),
|
|
|
|
child: Image.asset(
|
|
|
|
child: Image.asset(
|
|
|
|
'assets/images/location.png',
|
|
|
|
'assets/images/location.png',
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.orientation ==
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
? MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.06
|
|
|
|
0.06
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.11,
|
|
|
|
0.11,
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.orientation ==
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
? MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.width *
|
|
|
|
.width *
|
|
|
|
0.05
|
|
|
|
0.05
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.width *
|
|
|
|
.width *
|
|
|
|
0.09,
|
|
|
|
0.09,
|
|
|
|
@ -501,12 +610,15 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 20.0),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
|
|
|
top: 20.0),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
model.orders[index].firstName +
|
|
|
|
model.orders[index].firstName +
|
|
|
|
' ' +
|
|
|
|
' ' +
|
|
|
|
model.orders[index].lastName,
|
|
|
|
model.orders[index]
|
|
|
|
style: TextStyle(fontSize: 18.0),
|
|
|
|
.lastName,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 18.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
@ -524,7 +636,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
child: CircleContainer(
|
|
|
|
child: CircleContainer(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
model.orders[index].distanceInKilometers
|
|
|
|
model.orders[index]
|
|
|
|
|
|
|
|
.distanceInKilometers
|
|
|
|
.toString() +
|
|
|
|
.toString() +
|
|
|
|
' K.m\naway',
|
|
|
|
' K.m\naway',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
@ -542,7 +655,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (context) =>
|
|
|
|
builder: (context) =>
|
|
|
|
InformationPage(model.orders[index])));
|
|
|
|
InformationPage(
|
|
|
|
|
|
|
|
model.orders[index])));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|