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,27 +65,26 @@ class _AppDrawerState extends State<AppDrawer> {
]; ];
return Drawer( return Drawer(
child: ListTileTheme.merge(
selectedColor: Theme.of(context).accentColor,
child: Selector<MediaQueryData, double>( child: Selector<MediaQueryData, double>(
selector: (c, mq) => mq.effectiveBottomPadding, selector: (c, mq) => mq.effectiveBottomPadding,
builder: (c, mqPaddingBottom, child) { builder: (c, mqPaddingBottom, child) {
final iconTheme = IconTheme.of(context); final iconTheme = IconTheme.of(context);
return SingleChildScrollView( return SingleChildScrollView(
padding: EdgeInsets.only(bottom: mqPaddingBottom), padding: EdgeInsets.only(bottom: mqPaddingBottom),
child: Theme(
data: Theme.of(context).copyWith(
// 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,
), ),
), ),
),
); );
}, },
), ),
),
); );
} }