From d8df32f140b8413535e3009397eb7e015f9eadf6 Mon Sep 17 00:00:00 2001 From: Yegor Vialov Date: Thu, 2 Apr 2020 21:16:34 +0000 Subject: [PATCH] Resolves #524 Geolocator update --- lib/ui.dart | 14 +++++++++++++- pubspec.yaml | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) 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