download water functionality completed

dev
Sneha 2 years ago
parent dc4765d232
commit cd565a1195

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 KiB

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

@ -1,15 +1,11 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_flutter_android/google_maps_flutter_android.dart';
import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart';
import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:watermanagement/model/getdeliveryboy_model.dart';
import 'package:watermanagement/settings.dart';
import 'package:intl/intl.dart';
import 'order_tracking_page.dart';
@ -59,7 +55,9 @@ class _DelivryBookingDataState extends State<DelivryBookingData> with TickerProv
return GetDeliveryboyDetailsModel.fromJson(model);
}).toList();
activeOrdersList=bookingDataList.where((product) => product.orderStatus.toString().toLowerCase()!='delivered').toList();
activeOrdersList=activeOrdersList.reversed.toList();
completedOrdersList=bookingDataList.where((product) => product.orderStatus.toString().toLowerCase()=='delivered').toList();
completedOrdersList=completedOrdersList.reversed.toList();
isLoading = false;
});
@ -230,9 +228,16 @@ class _DelivryBookingDataState extends State<DelivryBookingData> with TickerProv
if(int.parse(x)<=int.parse(obj.price)){
var payload = new Map<String, dynamic>();
final DateTime now = DateTime.now();
final DateFormat formatter = DateFormat('dd-MMM-yyyy - HH:mm');
final String formatted = formatter.format(now);
print(formatted);
payload["amount_paid"] = amountPaidController.text.toString();
payload["payment_mode"] = dropdownTypeOfPayment.toString().toLowerCase();
payload["orderStatus"] = 'delivered';
payload["deliveredDate"] = formatted;
bool updateStatus = await AppSettings.deliveryboyFinishOrder(obj.bookingid,payload);
@ -418,7 +423,9 @@ class _DelivryBookingDataState extends State<DelivryBookingData> with TickerProv
SizedBox(
width: 30,
),
Column(
Visibility(
visible: activeOrdersList[index].stopTime==''||activeOrdersList[index].stopTime=='null',
child: Column(
children: [
IconButton(
iconSize: 30,
@ -466,6 +473,7 @@ class _DelivryBookingDataState extends State<DelivryBookingData> with TickerProv
),
],
),
),
SizedBox(width: 10,),

Loading…
Cancel
Save