新增文件 (10): - data/models/user.dart — 用户+角色模型 (匹配后端 UserResp/RoleResp) - data/models/auth_token.dart — 认证令牌模型 (匹配后端 LoginResp) - data/repositories/auth_repository.dart — 认证仓库 (JWT 安全持久化 + PIPL 合规) - features/auth/bloc/auth_bloc.dart — 认证 BLoC (8 种事件, 6 种状态) - features/auth/bloc/auth_event.dart — 认证事件 (sealed class 穷尽匹配) - features/auth/bloc/auth_state.dart — 认证状态 (Authenticated 含角色/班级码流程) - features/auth/views/login_page.dart — 登录/注册页面 (重写占位页面) - features/auth/views/role_selection_page.dart — 角色选择页 (4 种角色卡片) - features/auth/views/class_code_join_page.dart — 班级码加入页 (6 位输入) 修改文件 (5): - pubspec.yaml — 添加 flutter_secure_storage 依赖 - app.dart — 注入 AuthBloc + RepositoryProvider - main.dart — 简化入口 (认证恢复在 BLoC 中处理) - core/routing/app_router.dart — 添加认证路由守卫 + 2 新路由 - erp-diary/service/class_service.rs — 移除未使用的 PaginatorTrait import 验证: flutter analyze (0 error) + cargo check 通过
83 lines
1.4 KiB
YAML
83 lines
1.4 KiB
YAML
name: nuanji_app
|
||
description: "暖记 — 温暖治愈风格的手账日记 App"
|
||
publish_to: 'none'
|
||
version: 0.1.0+1
|
||
|
||
environment:
|
||
sdk: ^3.12.0
|
||
|
||
dependencies:
|
||
flutter:
|
||
sdk: flutter
|
||
|
||
# 状态管理
|
||
flutter_bloc: ^9.1.0
|
||
|
||
# 路由
|
||
go_router: ^14.8.0
|
||
|
||
# 不可变数据模型
|
||
freezed_annotation: ^2.4.0
|
||
json_annotation: ^4.9.0
|
||
|
||
# 本地数据库
|
||
isar: ^3.1.0
|
||
isar_flutter_libs: ^3.1.0
|
||
|
||
# 网络请求
|
||
dio: ^5.8.0
|
||
|
||
# 连接检测
|
||
connectivity_plus: ^6.1.0
|
||
|
||
# 安全存储(JWT 令牌持久化,PIPL 合规)
|
||
flutter_secure_storage: ^9.2.0
|
||
|
||
# 手写引擎
|
||
perfect_freehand: ^1.0.0
|
||
|
||
# 图表
|
||
fl_chart: ^0.70.0
|
||
|
||
# 图片压缩
|
||
flutter_image_compress: ^2.4.0
|
||
|
||
# 工具
|
||
logger: ^2.5.0
|
||
uuid: ^4.5.0
|
||
intl: ^0.19.0
|
||
path_provider: ^2.1.0
|
||
share_plus: ^10.1.0
|
||
permission_handler: ^11.4.0
|
||
|
||
# UI 组件
|
||
cupertino_icons: ^1.0.8
|
||
|
||
dev_dependencies:
|
||
flutter_test:
|
||
sdk: flutter
|
||
|
||
# 代码生成
|
||
build_runner: ^2.4.0
|
||
freezed: ^2.5.0
|
||
json_serializable: ^6.8.0
|
||
isar_generator: ^3.1.0
|
||
|
||
# 代码规范
|
||
flutter_lints: ^6.0.0
|
||
|
||
flutter:
|
||
uses-material-design: true
|
||
|
||
fonts:
|
||
- family: NotoSansSC
|
||
fonts:
|
||
- asset: assets/fonts/NotoSansSC-Regular.ttf
|
||
- asset: assets/fonts/NotoSansSC-Bold.ttf
|
||
weight: 700
|
||
- family: Caveat
|
||
fonts:
|
||
- asset: assets/fonts/Caveat-Regular.ttf
|
||
- asset: assets/fonts/Caveat-Bold.ttf
|
||
weight: 700
|