editable label & color

This commit is contained in:
2024-03-10 15:57:40 +01:00
parent 51cb8868a3
commit 35930d188c
12 changed files with 235 additions and 28 deletions

View File

@@ -4,11 +4,13 @@ class Account {
String label;
String color;
bool saving;
double interest;
Account({
this.label = '',
this.color = '',
this.saving = false,
this.interest = 0.0,
});
factory Account.fromJson(Map<String, dynamic> json) {
@@ -16,6 +18,7 @@ class Account {
label: json['label'],
color: json['color'],
saving: bool.parse(json['saving']),
interest: double.parse(json['intereset']),
);
}
@@ -23,6 +26,7 @@ class Account {
'label': label,
'color': color,
'saving': saving.toString(),
'intereset': interest.toString(),
};
Color rgbToColor() {