Improved json auto save & budget mobile UI

This commit is contained in:
2024-03-03 17:14:00 +01:00
parent f86c4cd18b
commit fc6f64a271
20 changed files with 570 additions and 168 deletions

View File

@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
class Settings {
final ThemeMode themeMode;
const Settings({
this.themeMode = ThemeMode.system,
});
factory Settings.fromJson(Map<String, dynamic> json) {
return Settings(
themeMode: ThemeMode.values.byName(json['themeMode']),
);
}
Map<String, String> toJson() => {
'themeMode': themeMode.name,
};
}