feat(theme): migrate to new theme system with static color methods
- Convert instance methods to static methods in AppColorScheme for getChangeColor and getChangeBackgroundColor - Update main.dart to use ShadThemeData with AppColorScheme color schemes instead of createLight/DarkShadTheme functions - Add app_theme.dart import to main.dart - Refactor asset_card.dart and coin_card.dart to call static methods via AppColorScheme class - Add app_spacing.dart import to action_buttons_row.dart - Replace SizedBox with proper spacing constants in action buttons row
This commit is contained in:
@@ -426,14 +426,14 @@ class AppColorScheme {
|
||||
|
||||
/// 获取买入按钮渐变(主题感知)- 用于盈利展示
|
||||
|
||||
/// 获取涨跌颜色(明暗通用)
|
||||
Color getChangeColor(bool isUp) => isUp ? AppColorScheme.up : AppColorScheme.down;
|
||||
/// 获取涨跌颜色(明暗通用)
|
||||
static Color getChangeColor(bool isUp) => isUp ? AppColorScheme.up : AppColorScheme.down;
|
||||
|
||||
/// 获取涨跌背景色(带透明度)
|
||||
Color getChangeBackgroundColor(bool isUp, {double opacity = 0.15}) {
|
||||
return isUp
|
||||
? AppColorScheme.up.withValues(alpha: opacity)
|
||||
: AppColorScheme.down.withValues(alpha: opacity);
|
||||
}
|
||||
/// 获取涨跌背景色(带透明度)
|
||||
static Color getChangeBackgroundColor(bool isUp, {double opacity = 0.15}) {
|
||||
return isUp
|
||||
? AppColorScheme.up.withValues(alpha: opacity)
|
||||
: AppColorScheme.down.withValues(alpha: opacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user