Files
Krezus/lib/repositories/account/models/budget.dart
2024-02-07 18:54:48 +01:00

22 lines
383 B
Dart

class Budget {
bool monthly;
double value;
Budget({
this.monthly = false,
this.value = 0.0,
});
factory Budget.fromJson(Map<String, dynamic> json) {
return Budget(
monthly: json['monthly'],
value: double.parse(json['value']),
);
}
Map<String, String> toJson() => {
'monthly': monthly.toString(),
'value': value.toString(),
};
}