feat:参照研听的基础工程
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import '../../../common/domain/metal_type.dart';
|
||||
|
||||
enum PriceColorMode {
|
||||
redUpGreenDown('红涨绿跌'),
|
||||
greenUpRedDown('绿涨红跌');
|
||||
|
||||
const PriceColorMode(this.label);
|
||||
|
||||
final String label;
|
||||
}
|
||||
|
||||
class ProfileSettings {
|
||||
const ProfileSettings({
|
||||
required this.amountHidden,
|
||||
required this.recycleDiscounts,
|
||||
required this.purityPresets,
|
||||
required this.priceColorMode,
|
||||
required this.mockLoggedIn,
|
||||
});
|
||||
|
||||
final bool amountHidden;
|
||||
final Map<MetalType, double> recycleDiscounts;
|
||||
final Map<String, double> purityPresets;
|
||||
final PriceColorMode priceColorMode;
|
||||
final bool mockLoggedIn;
|
||||
|
||||
ProfileSettings copyWith({
|
||||
bool? amountHidden,
|
||||
Map<MetalType, double>? recycleDiscounts,
|
||||
Map<String, double>? purityPresets,
|
||||
PriceColorMode? priceColorMode,
|
||||
bool? mockLoggedIn,
|
||||
}) {
|
||||
return ProfileSettings(
|
||||
amountHidden: amountHidden ?? this.amountHidden,
|
||||
recycleDiscounts: recycleDiscounts ?? this.recycleDiscounts,
|
||||
purityPresets: purityPresets ?? this.purityPresets,
|
||||
priceColorMode: priceColorMode ?? this.priceColorMode,
|
||||
mockLoggedIn: mockLoggedIn ?? this.mockLoggedIn,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user