fix: collapse button display color in dark mode

This commit is contained in:
appflowy 2022-02-05 10:26:51 +08:00
parent e65a320c00
commit ec4d69e5b8

View File

@ -53,6 +53,8 @@ class FlowyNavigation extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = context.watch<AppTheme>();
return ChangeNotifierProxyProvider<HomeStackNotifier, NavigationNotifier>( return ChangeNotifierProxyProvider<HomeStackNotifier, NavigationNotifier>(
create: (_) { create: (_) {
final notifier = Provider.of<HomeStackNotifier>(context, listen: false); final notifier = Provider.of<HomeStackNotifier>(context, listen: false);
@ -66,7 +68,7 @@ class FlowyNavigation extends StatelessWidget {
child: Row(children: [ child: Row(children: [
Selector<NavigationNotifier, PublishNotifier<bool>>( Selector<NavigationNotifier, PublishNotifier<bool>>(
selector: (context, notifier) => notifier.collapasedNotifier, selector: (context, notifier) => notifier.collapasedNotifier,
builder: (ctx, collapsedNotifier, child) => _renderCollapse(ctx, collapsedNotifier)), builder: (ctx, collapsedNotifier, child) => _renderCollapse(ctx, collapsedNotifier, theme)),
Selector<NavigationNotifier, List<NavigationItem>>( Selector<NavigationNotifier, List<NavigationItem>>(
selector: (context, notifier) => notifier.navigationItems, selector: (context, notifier) => notifier.navigationItems,
builder: (ctx, items, child) => Expanded( builder: (ctx, items, child) => Expanded(
@ -81,8 +83,7 @@ class FlowyNavigation extends StatelessWidget {
); );
} }
Widget _renderCollapse(BuildContext context, PublishNotifier<bool> collapsedNotifier) { Widget _renderCollapse(BuildContext context, PublishNotifier<bool> collapsedNotifier, AppTheme theme) {
final theme = context.watch<AppTheme>();
return ChangeNotifierProvider.value( return ChangeNotifierProvider.value(
value: collapsedNotifier, value: collapsedNotifier,
child: Consumer( child: Consumer(