- 配置 edge-to-edge 沉浸式状态栏与刘海屏适配 - 新增百度地图权限、AK 配置及定位权限说明 - 接入 MethodChannel 实现返回键退后台热启动优化 - 配置自定义签名并更新构建逻辑 - 完善 token 刷新与鉴权失效统一处理 - 新增地图页与截图页路由 - 修复返回键拦截导致的 PopScope 失效问题
15 lines
424 B
Dart
15 lines
424 B
Dart
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import '../domain/auth_repository.dart';
|
|
import 'auth_api.dart';
|
|
import 'auth_repository_impl.dart';
|
|
|
|
/// 认证仓库 Provider。
|
|
///
|
|
/// 会话级依赖,通过 ref.keepAlive() 避免页面切换时被销毁重建。
|
|
final authRepositoryProvider = Provider<AuthRepository>((ref) {
|
|
ref.keepAlive();
|
|
const api = AuthApi();
|
|
return AuthRepositoryImpl(api);
|
|
});
|