diff --git a/lib/main_huawei.dart b/lib/main_huawei.dart index 962c7317a..2cd615f8d 100644 --- a/lib/main_huawei.dart +++ b/lib/main_huawei.dart @@ -4,6 +4,7 @@ import 'package:aves/widget_common.dart'; const _flavor = AppFlavor.huawei; +@pragma('vm:entry-point') void main() => mainCommon(_flavor); @pragma('vm:entry-point') diff --git a/lib/main_izzy.dart b/lib/main_izzy.dart index bfb24afaf..5cd552966 100644 --- a/lib/main_izzy.dart +++ b/lib/main_izzy.dart @@ -4,6 +4,7 @@ import 'package:aves/widget_common.dart'; const _flavor = AppFlavor.izzy; +@pragma('vm:entry-point') void main() => mainCommon(_flavor); @pragma('vm:entry-point') diff --git a/lib/main_play.dart b/lib/main_play.dart index d4e6779e0..42ce7ccd3 100644 --- a/lib/main_play.dart +++ b/lib/main_play.dart @@ -4,6 +4,7 @@ import 'package:aves/widget_common.dart'; const _flavor = AppFlavor.play; +@pragma('vm:entry-point') void main() => mainCommon(_flavor); @pragma('vm:entry-point') diff --git a/lib/services/analysis_service.dart b/lib/services/analysis_service.dart index 706e24090..10f916ad9 100644 --- a/lib/services/analysis_service.dart +++ b/lib/services/analysis_service.dart @@ -19,6 +19,7 @@ class AnalysisService { static Future registerCallback() async { try { await _platform.invokeMethod('registerCallback', { + // callback needs to be annotated with `@pragma('vm:entry-point')` to work in release mode 'callbackHandle': PluginUtilities.getCallbackHandle(_init)?.toRawHandle(), }); } on PlatformException catch (e, stack) { @@ -40,6 +41,7 @@ class AnalysisService { const _channel = MethodChannel('deckers.thibault/aves/analysis_service_background'); +@pragma('vm:entry-point') Future _init() async { WidgetsFlutterBinding.ensureInitialized(); initPlatformServices(); diff --git a/lib/services/global_search.dart b/lib/services/global_search.dart index ee71345f5..9df1b3835 100644 --- a/lib/services/global_search.dart +++ b/lib/services/global_search.dart @@ -12,6 +12,7 @@ class GlobalSearch { static Future registerCallback() async { try { await _platform.invokeMethod('registerCallback', { + // callback needs to be annotated with `@pragma('vm:entry-point')` to work in release mode 'callbackHandle': PluginUtilities.getCallbackHandle(_init)?.toRawHandle(), }); } on PlatformException catch (e, stack) { @@ -20,6 +21,7 @@ class GlobalSearch { } } +@pragma('vm:entry-point') Future _init() async { WidgetsFlutterBinding.ensureInitialized(); diff --git a/pubspec.lock b/pubspec.lock index 4f17f9100..307a21a61 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -210,7 +210,7 @@ packages: name: dbus url: "https://pub.dartlang.org" source: hosted - version: "0.7.4" + version: "0.7.7" decorated_icon: dependency: "direct main" description: @@ -224,7 +224,7 @@ packages: name: device_info_plus url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.1" device_info_plus_linux: dependency: transitive description: @@ -259,7 +259,7 @@ packages: name: device_info_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "3.0.1" dynamic_color: dependency: "direct main" description: @@ -298,12 +298,12 @@ packages: source: hosted version: "1.3.1" ffi: - dependency: transitive + dependency: "direct overridden" description: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "2.0.1" fijkplayer: dependency: "direct main" description: @@ -678,7 +678,7 @@ packages: name: package_info_plus url: "https://pub.dartlang.org" source: hosted - version: "1.4.2" + version: "1.4.3" package_info_plus_linux: dependency: transitive description: @@ -713,7 +713,7 @@ packages: name: package_info_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.0.0" palette_generator: dependency: "direct main" description: @@ -764,7 +764,7 @@ packages: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.1.0" pdf: dependency: "direct main" description: @@ -1277,7 +1277,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.7.0" wkt_parser: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 0f7291474..c25d35709 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -70,7 +70,7 @@ dependencies: pdf: percent_indicator: permission_handler: - printing: 5.9.1 + printing: proj4dart: provider: screen_brightness: @@ -90,6 +90,8 @@ dependency_overrides: git: url: https://github.com/deckerst/flutter-permission-handler path: permission_handler_android + # TODO TLAD remove override when this is fixed: https://github.com/DavBfr/dart_pdf/issues/1104 + ffi: ">=1.1.0 <3.0.0" dev_dependencies: flutter_test: