Location updates

merge-requests/180/head
haroon amjad 2 years ago
parent 5a16657981
commit c34d8a2633

@ -47,7 +47,7 @@ class WorkListApiClient {
Map<String, dynamic> postParams = {
"P_NOTIFICATION_TYPE": pNotificationType,
"P_PAGE_NUM": pPageNum,
"P_PAGE_LIMIT": 25,
"P_PAGE_LIMIT": 50,
"P_ITEM_TYPE": pItemType,
"P_SEARCH_FROM_USER": pSearchUser,
"P_SEARCH_ITEM_TYPE_DSP_NAME": pSearchItemType,

@ -44,15 +44,18 @@ class Location {
AppPermissions.location((granted) {
if (granted) {
Geolocator.getLastKnownPosition(forceAndroidLocationManager: true).then((value) {
if (value == null) {
Geolocator.getCurrentPosition().then((value) {
done(value);
});
} else {
done(value);
}
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: const Duration(seconds: 5)).then((value) {
done(value);
});
// Geolocator.getLastKnownPosition(forceAndroidLocationManager: true).then((value) {
// if (value == null) {
// Geolocator.getCurrentPosition().then((value) {
// done(value);
// });
// } else {
// done(value);
// }
// });
} else {
// AppPermissions
}

Loading…
Cancel
Save