111
This commit is contained in:
@@ -3,9 +3,9 @@ import '../../../../core/theme/app_color_scheme.dart';
|
||||
import '../../../../core/theme/app_spacing.dart';
|
||||
import '../../../../core/theme/app_theme.dart';
|
||||
|
||||
/// 交易按钮组件
|
||||
/// 交易按鈕組件
|
||||
///
|
||||
/// CTA 买入/卖出按钮。profit-green底 / sell-red底,圆角lg,高48,买入白字/卖出红字16px bold。
|
||||
/// CTA 買入/賣出按鈕。profit-green底 / sell-red底,圓角lg,高48,買入白字/賣出紅字16px bold。
|
||||
class TradeButton extends StatelessWidget {
|
||||
final bool isBuy;
|
||||
final String? coinCode;
|
||||
@@ -27,7 +27,7 @@ class TradeButton extends StatelessWidget {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
final fillColor =
|
||||
isBuy ? AppColorScheme.buyButtonFill : AppColorScheme.sellButtonFill;
|
||||
// 买入按钮文字为白色,卖出按钮文字为红色
|
||||
// 買入按鈕文字為白色,賣出按鈕文字為紅色
|
||||
final textColor = isBuy
|
||||
? Colors.white
|
||||
: (enabled ? AppColorScheme.sellButtonFill : colorScheme.onSurface.withOpacity(0.3));
|
||||
@@ -52,7 +52,7 @@ class TradeButton extends StatelessWidget {
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'${isBuy ? '买入' : '卖出'} ${coinCode ?? ""}',
|
||||
'${isBuy ? '買入' : '賣出'} ${coinCode ?? ""}',
|
||||
style: AppTextStyles.headlineLarge(context).copyWith(
|
||||
color: enabled
|
||||
? textColor
|
||||
|
||||
Reference in New Issue
Block a user