Merge branch 'merge_fix_bottomsheet_into_dev' into 'development'

Merge fix bottomsheet into dev

See merge request Cloud_Solution/driver-app!68
logut
Elham 5 years ago
commit 3be1346bdb

@ -28,6 +28,10 @@ PODS:
- Flutter
- local_auth (0.0.1):
- Flutter
- location (0.0.1):
- Flutter
- location_web (0.0.1):
- Flutter
- map_launcher (0.0.1):
- Flutter
- maps_launcher (0.0.1):
@ -71,6 +75,8 @@ DEPENDENCIES:
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- local_auth (from `.symlinks/plugins/local_auth/ios`)
- location (from `.symlinks/plugins/location/ios`)
- location_web (from `.symlinks/plugins/location_web/ios`)
- map_launcher (from `.symlinks/plugins/map_launcher/ios`)
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
@ -118,6 +124,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_picker/ios"
local_auth:
:path: ".symlinks/plugins/local_auth/ios"
location:
:path: ".symlinks/plugins/location/ios"
location_web:
:path: ".symlinks/plugins/location_web/ios"
map_launcher:
:path: ".symlinks/plugins/map_launcher/ios"
maps_launcher:
@ -157,6 +167,8 @@ SPEC CHECKSUMS:
image_cropper: c8f9b4157933c7bb965a66d1c5e6c8fd408c6eb4
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740
location_web: b94e7433cfe28c0f7c8923c2ee482824b32e55a7
map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
maps_launcher: eae38ee13a9c3f210fa04e04bb4c073fa4c6ed92
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb

@ -242,6 +242,7 @@
"${BUILT_PRODUCTS_DIR}/image_cropper/image_cropper.framework",
"${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework",
"${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework",
"${BUILT_PRODUCTS_DIR}/location/location.framework",
"${BUILT_PRODUCTS_DIR}/map_launcher/map_launcher.framework",
"${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
@ -264,6 +265,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_cropper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/location.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/map_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",

@ -41,5 +41,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSLocationAlwaysUsageDescription</key>
<string>Needed to access location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Needed to access location</string>
</dict>
</plist>

@ -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) {

File diff suppressed because one or more lines are too long

@ -1,5 +1,6 @@
import 'package:connectivity/connectivity.dart';
import 'package:flutter/cupertino.dart';
import 'package:location/location.dart';
import 'app_shared_preferences.dart';
import 'app_toast.dart';
@ -42,4 +43,10 @@ class Utils {
static hideKeyboard(BuildContext context) {
FocusScope.of(context).unfocus();
}
static getLocation() async {
Location location = new Location();
LocationData currentLocation = await location.getLocation();
return currentLocation;
}
}

@ -67,9 +67,14 @@ dependencies:
# Qr code Scanner
barcode_scan: ^3.0.1
#mape
# map
map_launcher: ^0.12.0
# location
location: ^3.0.2

Loading…
Cancel
Save