Move all persistent state from AppState to Settings

This way all the persistant state of the app is managed from the same
place. It makes everything much easier. Also, it's required for when
GitJournal supports multiple repositories.
This commit is contained in:
Vishesh Handa
2020-09-24 23:44:32 +02:00
parent 1f32a3c10e
commit f30c52f595
11 changed files with 79 additions and 108 deletions

View File

@ -132,7 +132,8 @@ class _GitRemoteSettingsScreenState extends State<GitRemoteSettingsScreen> {
}
var stateContainer = Provider.of<StateContainer>(context);
var gitDir = stateContainer.appState.gitBaseDirectory;
final settings = Provider.of<Settings>(context);
var gitDir = settings.gitBaseDirectory;
// Figure out the next available folder
String repoFolderName = "journal_";