feat: 新增站内消息系统,支持通知与订单跳转
This commit is contained in:
1 parent
411ec8be23
commit
c799b62f6b
14 files changed
+464
-9
No files matched your search
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'app/app.dart';
|
||||
import 'core/notifications/local_notifications.dart';
|
||||
import 'core/providers.dart';
|
||||
import 'core/storage/token_storage.dart';
|
||||
|
||||
@@ -11,6 +12,9 @@ Future<void> main() async {
|
||||
// SharedPreferences 必须在 runApp 之前完成异步读取,再通过 override 注入。
|
||||
final storage = await TokenStorage.open();
|
||||
|
||||
// 系统通知渠道 + Android 13 通知权限;冷启动点击通知的路由也会在此暂存。
|
||||
await LocalNotifications.instance.init();
|
||||
|
||||
runApp(
|
||||
ProviderScope(
|
||||
overrides: [tokenStorageProvider.overrideWithValue(storage)],
|
||||
|
||||
Reference in new issue
Block a user