diff --git a/lib/ui.dart b/lib/ui.dart index 35099dc..292138f 100644 --- a/lib/ui.dart +++ b/lib/ui.dart @@ -6,7 +6,10 @@ class HomeAssistantUI { bool get isEmpty => views == null || views.isEmpty; - HomeAssistantUI(rawLovelaceConfig) { + HomeAssistantUI({rawLovelaceConfig}) { + if (rawLovelaceConfig == null) { + rawLovelaceConfig = _generateLovelaceConfig(); + } views = []; Logger.d("--Title: ${rawLovelaceConfig["title"]}"); title = rawLovelaceConfig["title"]; @@ -26,6 +29,15 @@ class HomeAssistantUI { }); } + Map _generateLovelaceConfig() { + Map result = {}; + result['title'] = 'Home'; + result['views'] = [ + + ]; + return result; + } + Widget build(BuildContext context, TabController tabController) { return TabBarView( controller: tabController, diff --git a/pubspec.yaml b/pubspec.yaml index 6a0ba8e..ae6000f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,7 +28,7 @@ dependencies: flutter_secure_storage: ^3.3.1+1 device_info: ^0.4.1+4 flutter_local_notifications: ^1.1.6 - geolocator: ^5.3.0 + geolocator: ^5.3.1 workmanager: ^0.2.2 battery: ^0.3.1+7 firebase_crashlytics: ^0.1.3+3