drawer color fix

This commit is contained in:
Thibault Deckers 2021-03-14 10:17:27 +09:00
parent abd3b17126
commit 64d80eb4be

View file

@ -65,26 +65,25 @@ class _AppDrawerState extends State<AppDrawer> {
]; ];
return Drawer( return Drawer(
child: Selector<MediaQueryData, double>( child: ListTileTheme.merge(
selector: (c, mq) => mq.effectiveBottomPadding, selectedColor: Theme.of(context).accentColor,
builder: (c, mqPaddingBottom, child) { child: Selector<MediaQueryData, double>(
final iconTheme = IconTheme.of(context); selector: (c, mq) => mq.effectiveBottomPadding,
return SingleChildScrollView( builder: (c, mqPaddingBottom, child) {
padding: EdgeInsets.only(bottom: mqPaddingBottom), final iconTheme = IconTheme.of(context);
child: Theme( return SingleChildScrollView(
data: Theme.of(context).copyWith( padding: EdgeInsets.only(bottom: mqPaddingBottom),
// color used by `ExpansionTile` for leading icon
unselectedWidgetColor: Colors.white,
),
child: IconTheme( child: IconTheme(
data: iconTheme.copyWith(size: iconTheme.size * MediaQuery.textScaleFactorOf(context)), data: iconTheme.copyWith(
size: iconTheme.size * MediaQuery.textScaleFactorOf(context),
),
child: Column( child: Column(
children: drawerItems, children: drawerItems,
), ),
), ),
), );
); },
}, ),
), ),
); );
} }