From 8e1486870950c58e9035f1fe9159e8c8b419b0a5 Mon Sep 17 00:00:00 2001 From: open-trade Date: Sun, 29 Nov 2020 14:28:07 +0800 Subject: [PATCH] bug fix --- flutter_hbb/lib/model.dart | 1 + flutter_hbb/lib/remote_page.dart | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flutter_hbb/lib/model.dart b/flutter_hbb/lib/model.dart index 65ecd32b2..3c38865e1 100644 --- a/flutter_hbb/lib/model.dart +++ b/flutter_hbb/lib/model.dart @@ -193,6 +193,7 @@ class FfiModel with ChangeNotifier { showLoading('Waiting for image...', context); _waitForImage = true; } + notifyListeners(); } } diff --git a/flutter_hbb/lib/remote_page.dart b/flutter_hbb/lib/remote_page.dart index 1838d40d9..b02723165 100644 --- a/flutter_hbb/lib/remote_page.dart +++ b/flutter_hbb/lib/remote_page.dart @@ -163,6 +163,7 @@ class _RemotePageState extends State { @override Widget build(BuildContext context) { + final pi = Provider.of(context).pi; EasyLoading.instance.loadingStyle = EasyLoadingStyle.light; return WillPopScope( onWillPop: () async { @@ -179,7 +180,7 @@ class _RemotePageState extends State { onPressed: () { setState(() => _showBar = !_showBar); }), - bottomNavigationBar: _showBar && FFI.ffiModel.pi.displays != null + bottomNavigationBar: _showBar && pi.displays != null ? BottomAppBar( elevation: 10, color: MyTheme.accent,