fix:UI对齐demo

This commit is contained in:
jingyun
2026-06-18 18:08:29 +08:00
parent f42ad566e0
commit 2d7523f901
14 changed files with 1613 additions and 355 deletions
@@ -0,0 +1,36 @@
import '../data/profile_models.dart';
class PriceColorPalette {
const PriceColorPalette({
required this.up,
required this.down,
required this.upBackground,
required this.downBackground,
});
final int up;
final int down;
final int upBackground;
final int downBackground;
}
const _redUpGreenDown = PriceColorPalette(
up: 0xFFC0392B,
down: 0xFF2E8B6F,
upBackground: 0xFFFBEDEA,
downBackground: 0xFFE7F2EE,
);
const _greenUpRedDown = PriceColorPalette(
up: 0xFF2E8B6F,
down: 0xFFC0392B,
upBackground: 0xFFE7F2EE,
downBackground: 0xFFFBEDEA,
);
PriceColorPalette priceColorPalette(PriceColorMode mode) {
return switch (mode) {
PriceColorMode.redUpGreenDown => _redUpGreenDown,
PriceColorMode.greenUpRedDown => _greenUpRedDown,
};
}