diff --git a/lib/features/document_search/view/sliver_search_bar.dart b/lib/features/document_search/view/sliver_search_bar.dart index ae29581..044dbdc 100644 --- a/lib/features/document_search/view/sliver_search_bar.dart +++ b/lib/features/document_search/view/sliver_search_bar.dart @@ -56,10 +56,11 @@ class SliverSearchBar extends StatelessWidget { }, ), onPressed: () { + final apiVersion = context.read(); showDialog( context: context, - builder: (_) => Provider.value( - value: context.read(), + builder: (context) => Provider.value( + value: apiVersion, child: const ManageAccountsPage(), ), ); diff --git a/lib/features/home/view/home_route.dart b/lib/features/home/view/home_route.dart index 03be9a3..0324c3c 100644 --- a/lib/features/home/view/home_route.dart +++ b/lib/features/home/view/home_route.dart @@ -109,16 +109,13 @@ class HomeRoute extends StatelessWidget { providers: [ ProxyProvider3( - update: (context, docApi, notifier, labelRepo, previous) { - print("UPDATED DOCUMENT CUBIT"); //TODO: REMOVE - return DocumentsCubit( - docApi, - notifier, - labelRepo, - Hive.box(HiveBoxes.localUserAppState) - .get(currentLocalUserId)!, - )..reload(); - }, + update: (context, docApi, notifier, labelRepo, previous) => DocumentsCubit( + docApi, + notifier, + labelRepo, + Hive.box(HiveBoxes.localUserAppState) + .get(currentLocalUserId)!, + )..reload(), ), Provider(create: (context) => DocumentScannerCubit()), ProxyProvider4