|
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:driverapp/config/config.dart';
|
|
|
|
|
import 'package:driverapp/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:driverapp/core/model/orders/next_order_request_model.dart';
|
|
|
|
|
import 'package:driverapp/core/model/orders/pending_orders_res_model.dart';
|
|
|
|
|
@ -23,13 +24,14 @@ class DeliveryConfirmedPage extends StatelessWidget {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return BaseView<OrdersViewModel>(
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
isAppBarGradient: true,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBarColor: Theme.of(context).primaryColor,
|
|
|
|
|
arrowColor: Colors.white,
|
|
|
|
|
titleColor: Colors.white,
|
|
|
|
|
body: SafeArea(
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Theme.of(context).primaryColor,
|
|
|
|
|
decoration: BoxDecoration(gradient: LINEAR_GRADIENT),
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Stack(
|
|
|
|
|
@ -41,9 +43,12 @@ class DeliveryConfirmedPage extends StatelessWidget {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.width * 0.7
|
|
|
|
|
: MediaQuery.of(context).size.width * 0.5,
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: MediaQuery.of(context).size.width * 0.12,
|
|
|
|
|
top: MediaQuery.of(context).size.width * 0.14,
|
|
|
|
|
),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white10,
|
|
|
|
|
@ -61,7 +66,7 @@ class DeliveryConfirmedPage extends StatelessWidget {
|
|
|
|
|
0.03,
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).deliveryInfo,
|
|
|
|
|
'Delivery Confirmed',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
@ -94,9 +99,15 @@ class DeliveryConfirmedPage extends StatelessWidget {
|
|
|
|
|
// ),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
height: MediaQuery.of(context).size.width * 1.0,
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.landscape
|
|
|
|
|
? MediaQuery.of(context).size.width * 0.6
|
|
|
|
|
: MediaQuery.of(context).size.width * 1.0,
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
top: MediaQuery.of(context).size.width * 0.75,
|
|
|
|
|
top: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.width * 0.70
|
|
|
|
|
: MediaQuery.of(context).size.width * 0.60,
|
|
|
|
|
),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
@ -115,41 +126,51 @@ class DeliveryConfirmedPage extends StatelessWidget {
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
bottom: MediaQuery.of(context).size.width * 0.00,
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
FlatButton.icon(
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
color: Colors.orangeAccent,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius:
|
|
|
|
|
new BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
label: Text(
|
|
|
|
|
TranslationBase.of(context).addNoteBtn,
|
|
|
|
|
style: TextStyle(color: Colors.white),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.landscape
|
|
|
|
|
? EdgeInsets.only(top: 60.0)
|
|
|
|
|
: EdgeInsets.only(top: 30.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
FlatButton.icon(
|
|
|
|
|
padding: EdgeInsets.all(14.0),
|
|
|
|
|
color: Colors.orangeAccent,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
label: Text(
|
|
|
|
|
TranslationBase.of(context).addNoteBtn,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 20.0),
|
|
|
|
|
),
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons.mode_edit,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
),
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons.mode_edit,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: MediaQuery.of(context).size.width *
|
|
|
|
|
0.00, //20,
|
|
|
|
|
),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: MediaQuery.of(context).size.width *
|
|
|
|
|
0.02, //20,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
label: TranslationBase.of(context)
|
|
|
|
|
.nextDelivery,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
onTap: () {
|
|
|
|
|
getNextOrder(context, model);
|
|
|
|
|
},
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(top: 30.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
label: TranslationBase.of(context)
|
|
|
|
|
.nextDelivery,
|
|
|
|
|
loading:
|
|
|
|
|
model.state == ViewState.BusyLocal,
|
|
|
|
|
onTap: () {
|
|
|
|
|
getNextOrder(context, model);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -157,7 +178,10 @@ class DeliveryConfirmedPage extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
top: MediaQuery.of(context).size.width * 0.6,
|
|
|
|
|
top: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.width * 0.6
|
|
|
|
|
: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
|
),
|
|
|
|
|
child: CustomerBriefCard(
|
|
|
|
|
itemId: item.orderID,
|
|
|
|
|
|