diff --git a/frontend/app_flowy/lib/workspace/presentation/home/navigation.dart b/frontend/app_flowy/lib/workspace/presentation/home/navigation.dart index 80e5e8c2de..1b5ddacc90 100644 --- a/frontend/app_flowy/lib/workspace/presentation/home/navigation.dart +++ b/frontend/app_flowy/lib/workspace/presentation/home/navigation.dart @@ -53,6 +53,8 @@ class FlowyNavigation extends StatelessWidget { @override Widget build(BuildContext context) { + final theme = context.watch(); + return ChangeNotifierProxyProvider( create: (_) { final notifier = Provider.of(context, listen: false); @@ -66,7 +68,7 @@ class FlowyNavigation extends StatelessWidget { child: Row(children: [ Selector>( selector: (context, notifier) => notifier.collapasedNotifier, - builder: (ctx, collapsedNotifier, child) => _renderCollapse(ctx, collapsedNotifier)), + builder: (ctx, collapsedNotifier, child) => _renderCollapse(ctx, collapsedNotifier, theme)), Selector>( selector: (context, notifier) => notifier.navigationItems, builder: (ctx, items, child) => Expanded( @@ -81,8 +83,7 @@ class FlowyNavigation extends StatelessWidget { ); } - Widget _renderCollapse(BuildContext context, PublishNotifier collapsedNotifier) { - final theme = context.watch(); + Widget _renderCollapse(BuildContext context, PublishNotifier collapsedNotifier, AppTheme theme) { return ChangeNotifierProvider.value( value: collapsedNotifier, child: Consumer(