refactor: Move to upstream geolocator
This commit is contained in:
parent
b66c2ca8ff
commit
6d4cc45d07
7 changed files with 49 additions and 26 deletions
|
|
@ -86,3 +86,7 @@ dependencies {
|
||||||
//implementation 'com.google.firebase:firebase-messaging:19.0.1' // Workaround for https://github.com/microg/android_packages_apps_GmsCore/issues/313#issuecomment-617651698
|
//implementation 'com.google.firebase:firebase-messaging:19.0.1' // Workaround for https://github.com/microg/android_packages_apps_GmsCore/issues/313#issuecomment-617651698
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations.all {
|
||||||
|
exclude group: 'com.google.android.gms'
|
||||||
|
}
|
||||||
|
|
@ -57,13 +57,17 @@ class SendLocationDialogState extends State<SendLocationDialog> {
|
||||||
Position position;
|
Position position;
|
||||||
try {
|
try {
|
||||||
position = await Geolocator.getCurrentPosition(
|
position = await Geolocator.getCurrentPosition(
|
||||||
desiredAccuracy: LocationAccuracy.best,
|
locationSettings: const LocationSettings(
|
||||||
timeLimit: const Duration(seconds: 30),
|
accuracy: LocationAccuracy.best,
|
||||||
|
timeLimit: Duration(seconds: 30),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
} on TimeoutException {
|
} on TimeoutException {
|
||||||
position = await Geolocator.getCurrentPosition(
|
position = await Geolocator.getCurrentPosition(
|
||||||
desiredAccuracy: LocationAccuracy.medium,
|
locationSettings: const LocationSettings(
|
||||||
timeLimit: const Duration(seconds: 30),
|
accuracy: LocationAccuracy.medium,
|
||||||
|
timeLimit: Duration(seconds: 30),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
setState(() => this.position = position);
|
setState(() => this.position = position);
|
||||||
|
|
|
||||||
32
pubspec.lock
32
pubspec.lock
|
|
@ -801,42 +801,50 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: geolocator
|
name: geolocator
|
||||||
sha256: b8f520252c5c66851295bcc263bc8ae7555501938427f72216ba7688702e261d
|
sha256: "0ec58b731776bc43097fcf751f79681b6a8f6d3bc737c94779fe9f1ad73c1a81"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.7.1"
|
version: "13.0.1"
|
||||||
geolocator_android:
|
geolocator_android:
|
||||||
dependency: "direct overridden"
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: geolocator_android
|
name: geolocator_android
|
||||||
sha256: a4834a98fab5124f2d5b881e62a40ebb4a71d6aad6ad577e047a3ffb69b67dac
|
sha256: "7aefc530db47d90d0580b552df3242440a10fe60814496a979aa67aa98b1fd47"
|
||||||
url: "https://hanntech-gmbh.gitlab.io/free2pass/flutter-geolocator-floss/"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "4.6.1"
|
||||||
geolocator_apple:
|
geolocator_apple:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: geolocator_apple
|
name: geolocator_apple
|
||||||
sha256: "1e8e398cc92151d946a4bbd34e2075885333e42d35ca33e418e7ce7b0a29991e"
|
sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.2"
|
version: "2.3.7"
|
||||||
geolocator_platform_interface:
|
geolocator_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: geolocator_platform_interface
|
name: geolocator_platform_interface
|
||||||
sha256: "9d6f34a8a4b704d504f34acc5e52d880a7d2caedd99739902d6319179b0336d4"
|
sha256: "386ce3d9cce47838355000070b1d0b13efb5bc430f8ecda7e9238c8409ace012"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.6"
|
version: "4.2.4"
|
||||||
geolocator_web:
|
geolocator_web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: geolocator_web
|
name: geolocator_web
|
||||||
sha256: "0b9e0ec13ce2211085cae0055b3516c975bd6cfe2878a20c8f13611f1a259855"
|
sha256: "2ed69328e05cd94e7eb48bb0535f5fc0c0c44d1c4fa1e9737267484d05c29b5e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.6"
|
version: "4.1.1"
|
||||||
|
geolocator_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: geolocator_windows
|
||||||
|
sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.3"
|
||||||
get_it:
|
get_it:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ dependencies:
|
||||||
flutter_typeahead: ^5.2.0
|
flutter_typeahead: ^5.2.0
|
||||||
flutter_web_auth_2: ^4.0.1
|
flutter_web_auth_2: ^4.0.1
|
||||||
flutter_webrtc: ^0.11.7
|
flutter_webrtc: ^0.11.7
|
||||||
geolocator: ^7.6.2
|
geolocator: ^13.0.1
|
||||||
go_router: ^14.3.0
|
go_router: ^14.3.0
|
||||||
handy_window: ^0.4.0
|
handy_window: ^0.4.0
|
||||||
hive: ^2.2.3
|
hive: ^2.2.3
|
||||||
|
|
@ -153,9 +153,6 @@ msix_config:
|
||||||
install_certificate: false
|
install_certificate: false
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
geolocator_android:
|
|
||||||
hosted: https://hanntech-gmbh.gitlab.io/free2pass/flutter-geolocator-floss
|
|
||||||
version: ^1.0.1
|
|
||||||
# waiting for null safety
|
# waiting for null safety
|
||||||
# Upstream pull request: https://github.com/AntoineMarcel/keyboard_shortcuts/pull/13
|
# Upstream pull request: https://github.com/AntoineMarcel/keyboard_shortcuts/pull/13
|
||||||
keyboard_shortcuts:
|
keyboard_shortcuts:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/android/app/build.gradle b/android/app/build.gradle
|
diff --git a/android/app/build.gradle b/android/app/build.gradle
|
||||||
index 7520ff2a..ae376d9d 100644
|
index f92f73f3..6d389efb 100644
|
||||||
--- a/android/app/build.gradle
|
--- a/android/app/build.gradle
|
||||||
+++ b/android/app/build.gradle
|
+++ b/android/app/build.gradle
|
||||||
@@ -2,7 +2,7 @@ plugins {
|
@@ -2,7 +2,7 @@ plugins {
|
||||||
|
|
@ -11,7 +11,7 @@ index 7520ff2a..ae376d9d 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
def localProperties = new Properties()
|
def localProperties = new Properties()
|
||||||
@@ -83,6 +83,6 @@ flutter {
|
@@ -83,10 +83,10 @@ flutter {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
@ -19,6 +19,12 @@ index 7520ff2a..ae376d9d 100644
|
||||||
+ implementation 'com.google.firebase:firebase-messaging:19.0.1' // Workaround for https://github.com/microg/android_packages_apps_GmsCore/issues/313#issuecomment-617651698
|
+ implementation 'com.google.firebase:firebase-messaging:19.0.1' // Workaround for https://github.com/microg/android_packages_apps_GmsCore/issues/313#issuecomment-617651698
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations.all {
|
||||||
|
- exclude group: 'com.google.android.gms'
|
||||||
|
+ //exclude group: 'com.google.android.gms'
|
||||||
|
}
|
||||||
|
\ No newline at end of file
|
||||||
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
|
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
|
||||||
index d0e0fbc9..0a546da0 100644
|
index d0e0fbc9..0a546da0 100644
|
||||||
--- a/android/app/proguard-rules.pro
|
--- a/android/app/proguard-rules.pro
|
||||||
|
|
@ -100,10 +106,10 @@ index b2fd960a..fdb01a4d 100644
|
||||||
include ":app"
|
include ":app"
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart
|
diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart
|
||||||
index 039dde89..1cefdd71 100644
|
index 1ba2659a..989f458e 100644
|
||||||
--- a/lib/utils/background_push.dart
|
--- a/lib/utils/background_push.dart
|
||||||
+++ b/lib/utils/background_push.dart
|
+++ b/lib/utils/background_push.dart
|
||||||
@@ -38,7 +38,7 @@ import '../config/setting_keys.dart';
|
@@ -39,7 +39,7 @@ import '../config/setting_keys.dart';
|
||||||
import '../widgets/matrix.dart';
|
import '../widgets/matrix.dart';
|
||||||
import 'platform_infos.dart';
|
import 'platform_infos.dart';
|
||||||
|
|
||||||
|
|
@ -112,7 +118,7 @@ index 039dde89..1cefdd71 100644
|
||||||
|
|
||||||
class NoTokenException implements Exception {
|
class NoTokenException implements Exception {
|
||||||
String get cause => 'Cannot get firebase token';
|
String get cause => 'Cannot get firebase token';
|
||||||
@@ -63,7 +63,7 @@ class BackgroundPush {
|
@@ -64,7 +64,7 @@ class BackgroundPush {
|
||||||
|
|
||||||
final pendingTests = <String, Completer<void>>{};
|
final pendingTests = <String, Completer<void>>{};
|
||||||
|
|
||||||
|
|
@ -122,7 +128,7 @@ index 039dde89..1cefdd71 100644
|
||||||
DateTime? lastReceivedPush;
|
DateTime? lastReceivedPush;
|
||||||
|
|
||||||
diff --git a/pubspec.yaml b/pubspec.yaml
|
diff --git a/pubspec.yaml b/pubspec.yaml
|
||||||
index 69c80d6e..efd32d89 100644
|
index fb3e3ca4..039b2ccc 100644
|
||||||
--- a/pubspec.yaml
|
--- a/pubspec.yaml
|
||||||
+++ b/pubspec.yaml
|
+++ b/pubspec.yaml
|
||||||
@@ -25,7 +25,7 @@ dependencies:
|
@@ -25,7 +25,7 @@ dependencies:
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
#include <file_selector_windows/file_selector_windows.h>
|
#include <file_selector_windows/file_selector_windows.h>
|
||||||
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
||||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||||
|
#include <geolocator_windows/geolocator_windows.h>
|
||||||
#include <pasteboard/pasteboard_plugin.h>
|
#include <pasteboard/pasteboard_plugin.h>
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
#include <record_windows/record_windows_plugin_c_api.h>
|
#include <record_windows/record_windows_plugin_c_api.h>
|
||||||
|
|
@ -36,6 +37,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
||||||
FlutterWebRTCPluginRegisterWithRegistrar(
|
FlutterWebRTCPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FlutterWebRTCPlugin"));
|
registry->GetRegistrarForPlugin("FlutterWebRTCPlugin"));
|
||||||
|
GeolocatorWindowsRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("GeolocatorWindows"));
|
||||||
PasteboardPluginRegisterWithRegistrar(
|
PasteboardPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("PasteboardPlugin"));
|
registry->GetRegistrarForPlugin("PasteboardPlugin"));
|
||||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
file_selector_windows
|
file_selector_windows
|
||||||
flutter_secure_storage_windows
|
flutter_secure_storage_windows
|
||||||
flutter_webrtc
|
flutter_webrtc
|
||||||
|
geolocator_windows
|
||||||
pasteboard
|
pasteboard
|
||||||
permission_handler_windows
|
permission_handler_windows
|
||||||
record_windows
|
record_windows
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue