所有一级页面和不分二级页面

This commit is contained in:
2026-05-25 12:58:29 +08:00
parent b9f747de05
commit afef5c4ef1
158 changed files with 13082 additions and 1602 deletions

View File

@@ -0,0 +1,78 @@
import 'package:maibu_satabot_v2/features/v2/my/data/datasources/my_remote_datasource.dart';
import 'package:maibu_satabot_v2/features/v2/my/data/models/my_models.dart';
/// 我的页面远程数据源实现(模拟数据)
class MyRemoteDataSourceImpl implements MyRemoteDataSource {
@override
Future<UserProfileModel> getUserProfile() async {
await Future.delayed(const Duration(milliseconds: 300));
return UserProfileModel(
name: '张工程师',
role: '运维工程师',
avatar: 'assets/images/avatar_engineer.png',
userId: 'ENG2024001',
);
}
@override
Future<List<MenuItemModel>> getMenuItems() async {
await Future.delayed(const Duration(milliseconds: 300));
return [
MenuItemModel(
id: 'personal_info',
title: '个人信息',
icon: 'person',
),
MenuItemModel(
id: 'message_settings',
title: '消息设置',
icon: 'notifications',
),
MenuItemModel(
id: 'offline_cache',
title: '离线缓存',
icon: 'cloud_download',
subTitle: '1.26 GB',
),
MenuItemModel(
id: 'night_mode',
title: '夜间模式',
icon: 'dark_mode',
hasSwitch: true,
switchValue: false,
),
MenuItemModel(
id: 'system_settings',
title: '系统设置',
icon: 'settings',
),
MenuItemModel(
id: 'help_feedback',
title: '帮助与反馈',
icon: 'help',
),
MenuItemModel(
id: 'about_us',
title: '关于我们',
icon: 'info',
subTitle: 'V2.1.0',
),
];
}
@override
Future<bool> toggleNightMode(bool enabled) async {
await Future.delayed(const Duration(milliseconds: 200));
// 模拟保存设置
return true;
}
@override
Future<bool> clearCache() async {
await Future.delayed(const Duration(seconds: 1));
// 模拟清除缓存
return true;
}
}