Remove another use of Settings.instance

I really want to remove this global variable, and only access it through
the Provider.
This commit is contained in:
Vishesh Handa
2020-08-16 15:51:53 +02:00
parent 155d04e465
commit d94a1e1630
3 changed files with 19 additions and 10 deletions

View File

@ -47,14 +47,15 @@ void showSnackbar(BuildContext context, String message) {
}
NotesFolderFS getFolderForEditor(
Settings settings,
NotesFolderFS rootFolder,
EditorType editorType,
) {
var spec = Settings.instance.defaultNewNoteFolderSpec;
var spec = settings.defaultNewNoteFolderSpec;
switch (editorType) {
case EditorType.Journal:
spec = Settings.instance.journalEditordefaultNewNoteFolderSpec;
spec = settings.journalEditordefaultNewNoteFolderSpec;
break;
default:
break;