This commit is contained in:
sion
2026-04-07 01:05:05 +08:00
parent edad10ff06
commit 5ca1274607
83 changed files with 1561 additions and 1241 deletions

View File

@@ -2,12 +2,12 @@ import 'package:flutter/material.dart';
import '../../core/theme/app_spacing.dart';
import '../../core/theme/app_theme_extension.dart';
/// 渐变按钮组件 - 支持 CTA 渐变效果
/// 漸變按鈕組件 - 支持 CTA 漸變效果
///
/// 设计规则
/// - 渐变方向: 135度 (primary → primary_container)
/// - 角: xxl (24px / 1.5rem)
/// - 无边
/// 設計規則
/// - 漸變方向: 135度 (primary → primary_container)
/// - 角: xxl (24px / 1.5rem)
/// - 無邊
class GradientButton extends StatelessWidget {
final String text;
final VoidCallback? onPressed;
@@ -28,7 +28,7 @@ class GradientButton extends StatelessWidget {
this.height = 48,
});
/// CTA 按 - 使用主题渐变
/// CTA 按 - 使用主題漸變
factory GradientButton.cta({
Key? key,
required String text,
@@ -47,7 +47,7 @@ class GradientButton extends StatelessWidget {
);
}
/// 入按 - 翡翠绿渐变
/// 入按 - 翡翠綠漸變
factory GradientButton.buy({
Key? key,
required String text,
@@ -67,7 +67,7 @@ class GradientButton extends StatelessWidget {
);
}
/// 出按 - 红色渐变
/// 出按 - 紅色漸變
factory GradientButton.sell({
Key? key,
required String text,
@@ -93,7 +93,7 @@ class GradientButton extends StatelessWidget {
final colorScheme = context.colors;
final buttonGradient = gradient ?? appColors.ctaGradient;
// 主感知色 - 在渐变背景上使用 onPrimary
// 主感知色 - 在漸變背景上使用 onPrimary
final textColor = colorScheme.onPrimary;
return Container(
@@ -145,11 +145,11 @@ class GradientButton extends StatelessWidget {
}
}
/// Ghost 按 - 次要操作
/// Ghost 按 - 次要操作
///
/// 设计规则
/// 設計規則
/// - Ghost Border: 15% opacity outline-variant
/// - 角: xxl (24px)
/// - 角: xxl (24px)
/// - 主色文字
class GhostButton extends StatelessWidget {
final String text;