Basic budget sliders
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
class Budget {
|
||||
String label;
|
||||
bool monthly;
|
||||
double value;
|
||||
|
||||
Budget({
|
||||
this.label = '',
|
||||
this.monthly = false,
|
||||
this.value = 0.0,
|
||||
});
|
||||
|
||||
factory Budget.fromJson(Map<String, dynamic> json) {
|
||||
return Budget(
|
||||
monthly: json['monthly'],
|
||||
label: json['label'],
|
||||
monthly: bool.parse(json['monthly']),
|
||||
value: double.parse(json['value']),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, String> toJson() => {
|
||||
'label': label,
|
||||
'monthly': monthly.toString(),
|
||||
'value': value.toString(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user