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

@@ -3,30 +3,30 @@ import '../../core/theme/app_color_scheme.dart';
import '../../core/theme/app_spacing.dart';
import '../../core/theme/app_theme_extension.dart';
/// NeonGlow - 霓虹光效
/// NeonGlow - 霓虹光效
///
/// Material Design 3 格的霓虹光效
/// 用于按钮、卡片、图标等需要突出示的元素
/// Material Design 3 格的霓虹光效
/// 用於按鈕、卡片、圖標等需要突出示的元素
///
/// 光效型:
/// 光效型:
/// - Primary: 青色光效 (#72dcff)
/// - Secondary: 紫色光效 (#dd8bfb)
/// - Tertiary: 绿色光效 (#afffd1)
/// - Error: 色光效 (#ff716c)
/// - Tertiary: 色光效 (#afffd1)
/// - Error: 色光效 (#ff716c)
class NeonGlow extends StatelessWidget {
/// 子
/// 子
final Widget child;
/// 光效
/// 光效
final Color glowColor;
/// 模糊半,默 15.0
/// 模糊半,默 15.0
final double blurRadius;
/// 散半,默 0.0
/// 散半,默 0.0
final double spreadRadius;
///
///
final BorderRadius? borderRadius;
const NeonGlow({
@@ -70,7 +70,7 @@ class NeonGlow extends StatelessWidget {
);
}
/// Tertiary 霓虹光效 (绿色)
/// Tertiary 霓虹光效 (色)
factory NeonGlow.tertiary({
Key? key,
required Widget child,
@@ -86,7 +86,7 @@ class NeonGlow extends StatelessWidget {
);
}
/// Error 霓虹光效 (色)
/// Error 霓虹光效 (色)
factory NeonGlow.error({
Key? key,
required Widget child,
@@ -122,32 +122,32 @@ class NeonGlow extends StatelessWidget {
}
}
/// NeonButton - 霓虹光效的按
/// NeonButton - 霓虹光效的按
///
/// 预设了常用配置,化使用
/// 預設了常用配置,化使用
class NeonButton extends StatefulWidget {
/// 按文本
/// 按文本
final String text;
/// 点击回调
/// 點擊回調
final VoidCallback? onPressed;
/// 按钮类
/// 按鈕類
final NeonButtonType type;
/// 是否示光效
/// 是否示光效
final bool showGlow;
/// 图标
/// 圖標
final IconData? icon;
/// 是否加
/// 是否加
final bool isLoading;
/// 按钮宽
/// 按鈕寬
final double? width;
/// 按高度,默 48
/// 按高度,默 48
final double height;
const NeonButton({
@@ -258,7 +258,7 @@ class _NeonButtonState extends State<NeonButton>
}
LinearGradient? get _gradient {
// 【化】移除所有渐变效果,改为纯色背景,提升专业金融感
// 【化】移除所有漸變效果,改為純色背景,提升專業金融感
return null;
}
@@ -335,39 +335,39 @@ class _NeonButtonState extends State<NeonButton>
}
}
/// 按钮类
/// 按鈕類
enum NeonButtonType {
/// 主要按 (青色)
/// 主要按 (青色)
primary,
/// 次要按 (紫色)
/// 次要按 (紫色)
secondary,
/// 成功按 (绿色)
/// 成功按 (色)
tertiary,
/// 危险按钮 (色)
/// 危險按鈕 (色)
error,
/// 框按
/// 框按
outline,
}
/// NeonIcon - 霓虹光效的图标
/// NeonIcon - 霓虹光效的圖標
class NeonIcon extends StatelessWidget {
/// 图标
/// 圖標
final IconData icon;
/// 图标大小
/// 圖標大小
final double size;
/// 图标颜
/// 圖標顏
final Color color;
/// 光效色,默使用图标颜
/// 光效色,默使用圖標顏
final Color? glowColor;
/// 光效模糊半
/// 光效模糊半
final double glowBlur;
const NeonIcon({