chore: 更新国际化翻译及 UI 组件优化

This commit is contained in:
zl-q
2026-03-30 09:07:30 +08:00
parent 0f3175e303
commit 60318b7aaa
28 changed files with 1360 additions and 66 deletions
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import '../../../../core/theme/design_tokens.dart';
const homeBackgroundFieldKey = ValueKey('home_background_field');
class HomeBackgroundField extends StatelessWidget {
@@ -13,12 +15,65 @@ class HomeBackgroundField extends StatelessWidget {
key: homeBackgroundFieldKey,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [colorScheme.surface, colorScheme.surfaceContainerLowest],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
colorScheme.surface,
colorScheme.surfaceContainerLow,
colorScheme.surface,
],
stops: const [0, 0.38, 1],
),
),
child: Stack(
fit: StackFit.expand,
children: [
Positioned(
top: -(AppSpacing.xxl * 2),
left: -(AppSpacing.xxl * 2),
child: _AmbientOrb(
color: colorScheme.primaryContainer.withValues(alpha: 0.55),
size: AppSpacing.xxl * 8,
),
),
Positioned(
right: -(AppSpacing.xxl * 2),
top: AppSpacing.xxl,
child: _AmbientOrb(
color: colorScheme.secondaryContainer.withValues(alpha: 0.42),
size: AppSpacing.xxl * 6,
),
),
],
),
);
}
}
class _AmbientOrb extends StatelessWidget {
const _AmbientOrb({required this.color, required this.size});
final Color color;
final double size;
@override
Widget build(BuildContext context) {
return IgnorePointer(
child: Container(
width: size,
height: size,
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: RadialGradient(
colors: [
color,
color.withValues(alpha: 0.12),
color.withValues(alpha: 0),
],
stops: const [0, 0.55, 1],
),
),
),
child: const SizedBox.expand(),
);
}
}