mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +08:00
App: Use a provider consumer
I'm hoping with this if any value in the repo changes it will result in a rubuild of the entire subtree, so this way I can change the entire NotesFolderFS easily.
This commit is contained in:
12
lib/app.dart
12
lib/app.dart
@ -49,11 +49,13 @@ class JournalApp extends StatefulWidget {
|
|||||||
|
|
||||||
Widget app = ChangeNotifierProvider.value(
|
Widget app = ChangeNotifierProvider.value(
|
||||||
value: repo,
|
value: repo,
|
||||||
child: ChangeNotifierProvider.value(
|
child: Consumer<Repository>(
|
||||||
value: repo.settings,
|
builder: (_, repo, __) => ChangeNotifierProvider.value(
|
||||||
child: ChangeNotifierProvider.value(
|
value: repo.settings,
|
||||||
child: JournalApp(),
|
child: ChangeNotifierProvider.value(
|
||||||
value: repo.notesFolder,
|
child: JournalApp(),
|
||||||
|
value: repo.notesFolder,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user