App intents (aims to support Siri on iOS) (untested)

This commit is contained in:
2026-01-09 01:39:08 +08:00
parent 64c5ee0fe9
commit e6fb38572c
10 changed files with 745 additions and 13 deletions

View File

@@ -23,6 +23,7 @@ import 'package:island/route.dart';
import 'package:island/services/notify.dart';
import 'package:island/services/widget_sync_service.dart';
import 'package:island/services/timezone.dart';
import 'package:island/services/app_intents.dart';
import 'package:island/widgets/alert.dart';
import 'package:island/widgets/app_scaffold.dart';
import 'package:relative_time/relative_time.dart';
@@ -99,6 +100,17 @@ void main() async {
talker.error("[SplashScreen] Failed to load timezone database... $err");
}
try {
talker.info("[AppIntents] Initializing App Intents service...");
final appIntentsService = AppIntentsService();
await appIntentsService.initialize();
talker.info("[AppIntents] App Intents service is ready!");
} catch (err) {
talker.error(
"[AppIntents] Failed to initialize App Intents service... $err",
);
}
final prefs = await SharedPreferences.getInstance();
if (!kIsWeb && (Platform.isMacOS || Platform.isLinux || Platform.isWindows)) {