diff --git a/src/ui/flutter_app/lib/common/config.dart b/src/ui/flutter_app/lib/common/config.dart index 8b1446a7..fcd6621f 100644 --- a/src/ui/flutter_app/lib/common/config.dart +++ b/src/ui/flutter_app/lib/common/config.dart @@ -61,7 +61,9 @@ class Config { static bool mayFly = true; static int maxStepsLedToDraw = 50; - static Future loadProfile() async { + static Future loadSettings() async { + print("Loading settings..."); + final settings = await Settings.instance(); Config.toneEnabled = settings['ToneEnabled'] ?? true; @@ -120,6 +122,8 @@ class Config { rule.mayFly = Config.mayFly = settings['MayFly'] ?? true; rule.maxStepsLedToDraw = Config.maxStepsLedToDraw = settings['MaxStepsLedToDraw'] ?? 50; + + print("Loading settings done!"); } static Future save() async { diff --git a/src/ui/flutter_app/lib/main.dart b/src/ui/flutter_app/lib/main.dart index 47990f7c..08707240 100644 --- a/src/ui/flutter_app/lib/main.dart +++ b/src/ui/flutter_app/lib/main.dart @@ -131,7 +131,7 @@ class _SanmillAppState extends State { @override void initState() { Chain.capture(() { - Config.loadProfile(); + Config.loadSettings(); }); super.initState(); }