refactor: 重构 schemas 结构,统一枚举定义
This commit is contained in:
@@ -1,23 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../core/theme/design_tokens.dart';
|
||||
import '../../../../shared/widgets/app_loading_indicator.dart';
|
||||
|
||||
class AuthBootScreen extends StatelessWidget {
|
||||
const AuthBootScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Scaffold(
|
||||
backgroundColor: AppColors.authBackgroundTop,
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFEFF8FF),
|
||||
body: SafeArea(
|
||||
child: Center(
|
||||
child: AppLoadingIndicator(
|
||||
variant: AppLoadingVariant.surface,
|
||||
size: 28,
|
||||
strokeWidth: 2.5,
|
||||
color: AppColors.authPrimaryButton,
|
||||
trackColor: AppColors.authPrimaryButtonDisabled,
|
||||
child: Image.asset(
|
||||
'assets/branding/assistant_octopus_foreground.png',
|
||||
width: 260,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
enum ScheduleSourceType { manual, imported, agentGenerated }
|
||||
|
||||
enum ScheduleStatus { active, completed, canceled, archived }
|
||||
enum ScheduleStatus { active, archived }
|
||||
|
||||
class ScheduleItemModel {
|
||||
final String id;
|
||||
@@ -279,9 +279,7 @@ ScheduleSourceType _sourceTypeFromApi(String? raw) {
|
||||
ScheduleStatus _statusFromApi(String? raw) {
|
||||
switch (raw) {
|
||||
case 'completed':
|
||||
return ScheduleStatus.completed;
|
||||
case 'canceled':
|
||||
return ScheduleStatus.canceled;
|
||||
case 'archived':
|
||||
return ScheduleStatus.archived;
|
||||
case 'active':
|
||||
@@ -294,10 +292,6 @@ String _statusToApi(ScheduleStatus status) {
|
||||
switch (status) {
|
||||
case ScheduleStatus.active:
|
||||
return 'active';
|
||||
case ScheduleStatus.completed:
|
||||
return 'completed';
|
||||
case ScheduleStatus.canceled:
|
||||
return 'canceled';
|
||||
case ScheduleStatus.archived:
|
||||
return 'archived';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user