From 2bfd6ea1999a2760c74469c54f27eca4acf9b734 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sun, 2 Jun 2019 15:56:36 +0200 Subject: [PATCH] setState may not be async --- lib/state_container.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/state_container.dart b/lib/state_container.dart index 81cb2e74..59cd7f83 100644 --- a/lib/state_container.dart +++ b/lib/state_container.dart @@ -229,7 +229,7 @@ class StateContainerState extends State { } void completeGitHostSetup(String subFolder) { - setState(() async { + () async { appState.remoteGitRepoConfigured = true; appState.remoteGitRepoFolderName = "journal"; appState.remoteGitRepoSubFolder = subFolder; @@ -250,7 +250,9 @@ class StateContainerState extends State { await _persistConfig(); _loadNotesFromDisk(); _syncNotes(); - }); + + setState(() {}); + }(); } void completeOnBoarding() {