|
|
|
|
@ -9,6 +9,7 @@ import 'package:driverapp/widgets/buttons/secondary_button.dart';
|
|
|
|
|
import 'package:driverapp/widgets/delivery/customer_brief_card.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:location/location.dart';
|
|
|
|
|
|
|
|
|
|
import '../../uitl/translations_delegate_base.dart';
|
|
|
|
|
import '../../widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
@ -131,11 +132,14 @@ class DeliveryConfirmedPage extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
label: TranslationBase.of(context).nextDelivery,
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
label: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.nextDelivery,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
onTap: () {
|
|
|
|
|
getNextOrder(context, model);
|
|
|
|
|
},),
|
|
|
|
|
getNextOrder(context, model);
|
|
|
|
|
},),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -166,11 +170,15 @@ class DeliveryConfirmedPage extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getNextOrder(BuildContext context, OrdersViewModel model) async {
|
|
|
|
|
model.setState(ViewState.BusyLocal);
|
|
|
|
|
LocationData loc = await Utils.getLocation();
|
|
|
|
|
NextOrderRequestModel nextOrderRequestModel = NextOrderRequestModel(
|
|
|
|
|
pageIndex: 0,
|
|
|
|
|
pageSize: 0,
|
|
|
|
|
latitude: "46.621730",
|
|
|
|
|
longitude: "24.797682",
|
|
|
|
|
latitude: loc.latitude.toString(),
|
|
|
|
|
//"46.621730",
|
|
|
|
|
longitude: loc.longitude.toString(),
|
|
|
|
|
//"24.797682",
|
|
|
|
|
searchKey: "");
|
|
|
|
|
await model.nextOrder(nextOrderRequestModel);
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
|