43 lines
1.1 KiB
Dart
43 lines
1.1 KiB
Dart
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,
|
|
);
|
|
}
|
|
}
|