fix:UI对齐demo
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user