Files
xianyan/lib/features/home/presentation/widgets/home_action_buttons.dart
Developer 182735df3b release: 发布v6.6.2版本,优化多项功能与体验
本次更新包含:
1.  更新应用标语与隐私政策文案,调整品牌宣传语
2.  重构Feed ID解析、HTML清理工具类,提取重复逻辑
3.  新增全屏图片查看器、通用动画操作按钮组件
4.  修复电池监听空指针、快捷操作异常捕获问题
5.  优化搜索、会话列表、RSS阅读器等页面体验
6.  完善多语言支持,新增多个翻译模块
7.  移除冗余代码,统一数字格式化逻辑
8.  调整登录页面布局与交互逻辑
2026-06-01 08:16:01 +08:00

78 lines
2.4 KiB
Dart

import 'package:flutter/cupertino.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../../core/theme/app_theme.dart';
import '../../../../core/theme/app_spacing.dart';
import '../../../../core/theme/app_typography.dart';
import '../../../../shared/widgets/containers/glass_container.dart';
import '../../../../core/utils/ui/interaction_animations.dart';
import '../../../../l10n/translations.dart';
class HomeActionButtons extends ConsumerWidget {
const HomeActionButtons({
required this.onCreateCard,
required this.onEditSentence,
super.key,
});
final VoidCallback onCreateCard;
final VoidCallback onEditSentence;
@override
Widget build(BuildContext context, WidgetRef ref) {
final ext = AppTheme.ext(context);
final t = ref.watch(translationsProvider);
return SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: AppSpacing.md,
vertical: AppSpacing.sm,
),
child: Row(
children: [
Expanded(
child: BounceButton(
onTap: onCreateCard,
child: GlassContainer(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
t.home.base.createCard,
style: AppTypography.subhead.copyWith(
color: ext.textPrimary,
fontWeight: FontWeight.w600,
),
),
],
),
),
),
),
const SizedBox(width: AppSpacing.sm),
Expanded(
child: BounceButton(
onTap: onEditSentence,
child: GlassContainer(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
t.home.base.editThisSentence,
style: AppTypography.subhead.copyWith(
color: ext.textPrimary,
fontWeight: FontWeight.w600,
),
),
],
),
),
),
),
],
),
),
);
}
}