mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +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:
@ -49,13 +49,15 @@ class JournalApp extends StatefulWidget {
|
||||
|
||||
Widget app = ChangeNotifierProvider.value(
|
||||
value: repo,
|
||||
child: ChangeNotifierProvider.value(
|
||||
child: Consumer<Repository>(
|
||||
builder: (_, repo, __) => ChangeNotifierProvider.value(
|
||||
value: repo.settings,
|
||||
child: ChangeNotifierProvider.value(
|
||||
child: JournalApp(),
|
||||
value: repo.notesFolder,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
app = ChangeNotifierProvider.value(
|
||||
|
Reference in New Issue
Block a user