diff --git a/siro_driver/lib/controller/functions/crud.dart b/siro_driver/lib/controller/functions/crud.dart index fc86373a..7078c322 100755 --- a/siro_driver/lib/controller/functions/crud.dart +++ b/siro_driver/lib/controller/functions/crud.dart @@ -288,10 +288,12 @@ class CRUD { } } return 'token_expired'; - } else { + } else if (response.statusCode >= 500) { addError('Non-200: ${response.statusCode}', 'crud().get - Other', url.toString()); return 'failure'; + } else { + return 'failure'; } } on TimeoutException { return 'failure'; @@ -361,10 +363,12 @@ class CRUD { addError('Unauthorized: ${jsonData['error']}', 'crud().getWallet - 401', url.toString()); return 'failure'; - } else { + } else if (response.statusCode >= 500) { addError('Non-200: ${response.statusCode}', 'crud().getWallet - Other', url.toString()); return 'failure'; + } else { + return 'failure'; } } diff --git a/siro_driver/lib/controller/functions/package_info.dart b/siro_driver/lib/controller/functions/package_info.dart index c6c23533..a1acddac 100755 --- a/siro_driver/lib/controller/functions/package_info.dart +++ b/siro_driver/lib/controller/functions/package_info.dart @@ -169,6 +169,12 @@ void showUpdateDialog(BuildContext context) { class DeviceHelper { static Future getDeviceFingerprint() async { await EncryptionHelper.initialize(); + + final cached = box.read(BoxName.deviceFingerprint); + if (cached != null && cached.toString().isNotEmpty) { + return cached.toString(); + } + final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); var deviceData; @@ -191,7 +197,7 @@ class DeviceHelper { final String fingerprint = EncryptionHelper.instance.encryptData('${deviceId}_$deviceModel'); - + box.write(BoxName.deviceFingerprint, fingerprint); return (fingerprint); } catch (e) { diff --git a/siro_driver/lib/controller/home/captin/map_driver_controller.dart b/siro_driver/lib/controller/home/captin/map_driver_controller.dart index d89c0ca4..18e39887 100755 --- a/siro_driver/lib/controller/home/captin/map_driver_controller.dart +++ b/siro_driver/lib/controller/home/captin/map_driver_controller.dart @@ -2860,7 +2860,7 @@ class MapDriverController extends GetxController polyLines.removeWhere( (p) => p.polylineId.value.startsWith('passenger_walk_line')); - if (!isRideStarted && + if (!isRideStarted && isArrivedSend && upcomingPathPoints.isNotEmpty && latLngPassengerLocation.latitude != 0) { final LatLng lastRoadPt = upcomingPathPoints.last; diff --git a/siro_driver/lib/views/home/Captin/mapDriverWidgets/google_driver_map_page.dart b/siro_driver/lib/views/home/Captin/mapDriverWidgets/google_driver_map_page.dart index 4d90dbdf..b177e844 100755 --- a/siro_driver/lib/views/home/Captin/mapDriverWidgets/google_driver_map_page.dart +++ b/siro_driver/lib/views/home/Captin/mapDriverWidgets/google_driver_map_page.dart @@ -69,6 +69,7 @@ class GoogleDriverMap extends StatelessWidget { icon: controller.startIcon, ), if (!controller.isRideStarted && + controller.isArrivedSend && controller.upcomingPathPoints.isNotEmpty && controller.walkIcon != null) Marker(