feat: 优化前端 UI 组件与交互体验
- 优化日历、待办、消息等页面交互 - 更新 ChatBloc 与 UI Schema 渲染 - 优化联系人、首页、设置页面体验
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:go_router/go_router.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
import '../../../../core/di/injection.dart';
|
||||
import '../../../../core/theme/design_tokens.dart';
|
||||
import '../../../../shared/widgets/app_loading_indicator.dart';
|
||||
import '../../../../shared/widgets/page_header.dart' as widgets;
|
||||
import '../../../../shared/widgets/app_button.dart';
|
||||
import '../../../../shared/widgets/toast/toast.dart';
|
||||
@@ -130,7 +131,7 @@ class _TodoDetailScreenState extends State<TodoDetailScreen> {
|
||||
|
||||
Widget _buildContent() {
|
||||
if (_isLoading) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
return const Center(child: AppLoadingIndicator(size: 22));
|
||||
}
|
||||
|
||||
if (_error != null) {
|
||||
@@ -428,6 +429,7 @@ class _EditTodoSheetState extends State<_EditTodoSheet> {
|
||||
late TextEditingController _descriptionController;
|
||||
late int _priority;
|
||||
late Set<String> _selectedScheduleItems;
|
||||
late final Future<List<_ScheduleItemSimple>> _scheduleItemsFuture;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -438,6 +440,7 @@ class _EditTodoSheetState extends State<_EditTodoSheet> {
|
||||
);
|
||||
_priority = widget.todo.priority;
|
||||
_selectedScheduleItems = widget.todo.scheduleItems.map((e) => e.id).toSet();
|
||||
_scheduleItemsFuture = _loadScheduleItems();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -534,11 +537,11 @@ class _EditTodoSheetState extends State<_EditTodoSheet> {
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: FutureBuilder(
|
||||
future: _loadScheduleItems(),
|
||||
child: FutureBuilder<List<_ScheduleItemSimple>>(
|
||||
future: _scheduleItemsFuture,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
return const Center(child: AppLoadingIndicator(size: 22));
|
||||
}
|
||||
if (snapshot.hasError) {
|
||||
return Center(child: Text('加载失败: ${snapshot.error}'));
|
||||
|
||||
Reference in New Issue
Block a user