Fix background isolates on Flutter 3.3

This commit is contained in:
Ming Ming 2022-12-10 22:43:41 +08:00
parent 2990110007
commit 5884919c1b
4 changed files with 7 additions and 10 deletions

View file

@ -56,6 +56,7 @@ void stopService() {
}
@visibleForTesting
@pragma("vm:entry-point")
Future<void> serviceMain() async {
_Service._shouldRun.value = true;
WidgetsFlutterBinding.ensureInitialized();

View file

@ -109,6 +109,7 @@ class _IsolateMessage {
final Account account;
}
@pragma("vm:entry-point")
Future<JsonObj> _isolateMain(JsonObj messageJson) async {
final message = _IsolateMessage.fromJson(messageJson);
await app_init.init(app_init.InitIsolateType.flutterIsolate);

View file

@ -507,12 +507,10 @@ packages:
flutter_isolate:
dependency: "direct main"
description:
path: "."
ref: "2.0.2-nc-photos-1"
resolved-ref: "8d8516b169860caba762baed43a7888798c5b7d7"
url: "https://gitlab.com/nc-photos/flutter_isolate.git"
source: git
version: "2.0.2"
name: flutter_isolate
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
flutter_keyboard_visibility:
dependency: transitive
description:

View file

@ -59,10 +59,7 @@ dependencies:
ref: v0.2.6-nc-photos-2
flutter_bloc: ^8.0.0
flutter_colorpicker: ^1.0.3
flutter_isolate:
git:
url: https://gitlab.com/nc-photos/flutter_isolate.git
ref: 2.0.2-nc-photos-1
flutter_isolate: ^2.0.4
flutter_map: ^1.1.1
flutter_staggered_grid_view:
git: