refactor: 重构前端 UI 组件与后端 AgentScope schemas

This commit is contained in:
qzl
2026-03-12 18:26:10 +08:00
parent 78c2488144
commit f201babb48
16 changed files with 1341 additions and 617 deletions
@@ -145,12 +145,22 @@ class _CreateEventSheetState extends State<CreateEventSheet>
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () => Navigator.pop(context),
child: const Icon(
LucideIcons.x,
size: 24,
color: AppColors.slate700,
SizedBox(
width: AppSpacing.xxl * 2,
height: AppSpacing.xxl * 2,
child: TextButton(
onPressed: () => Navigator.pop(context),
style: TextButton.styleFrom(
padding: const EdgeInsets.all(AppSpacing.none),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppRadius.full),
),
),
child: const Icon(
LucideIcons.x,
size: AppSpacing.xxl,
color: AppColors.slate700,
),
),
),
Text(
@@ -164,16 +174,25 @@ class _CreateEventSheetState extends State<CreateEventSheet>
ValueListenableBuilder<TextEditingValue>(
valueListenable: _titleController,
builder: (context, value, child) {
return GestureDetector(
onTap: _saveEvent,
child: Text(
'保存',
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
color: value.text.trim().isNotEmpty
? AppColors.blue600
: AppColors.slate400,
final enabled = value.text.trim().isNotEmpty;
return SizedBox(
height: AppSpacing.xxl * 2,
child: TextButton(
onPressed: enabled ? _saveEvent : null,
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(
horizontal: AppSpacing.md,
),
minimumSize: const Size(AppSpacing.none, AppSpacing.none),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
child: Text(
'保存',
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
color: enabled ? AppColors.blue600 : AppColors.slate400,
),
),
),
);