From 5b6155057cb39e76bd2f90625f3e1ef5fdfcd39b Mon Sep 17 00:00:00 2001 From: Yegor Vialov Date: Sun, 4 Nov 2018 11:23:21 +0200 Subject: [PATCH] Fix views count issue on app loading --- lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 30c7ee7..7e36300 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -532,7 +532,7 @@ class _MainPageState extends State with WidgetsBindingObserver { @override Widget build(BuildContext context) { // This method is rerun every time setState is called. - if (_homeAssistant.entities.isEmpty) { + if (_homeAssistant.ui == null || _homeAssistant.ui.views == null) { return _buildScaffold(true); } else { return DefaultTabController(