info: fixed metadata header selection color

This commit is contained in:
Thibault Deckers 2020-05-24 09:49:47 +09:00
parent 6b68004806
commit 033dd84282

View file

@ -81,20 +81,26 @@ class _MetadataSectionSliverState extends State<MetadataSectionSliver> with Auto
return InfoRowGroup(dir.tags); return InfoRowGroup(dir.tags);
} }
final dir = directoriesWithTitle[index - 1 - untitledDirectoryCount]; final dir = directoriesWithTitle[index - 1 - untitledDirectoryCount];
return ExpansionTileCard( return Theme(
value: dir.name, data: Theme.of(context).copyWith(
expandedNotifier: _expandedDirectoryNotifier, // color used by the `ExpansionTileCard` for selected text and icons
title: _DirectoryTitle(dir.name), accentColor: Colors.white,
children: [ ),
const Divider(thickness: 1.0, height: 1.0), child: ExpansionTileCard(
Container( value: dir.name,
alignment: Alignment.topLeft, expandedNotifier: _expandedDirectoryNotifier,
padding: const EdgeInsets.all(8), title: _DirectoryTitle(dir.name),
child: InfoRowGroup(dir.tags), children: [
), const Divider(thickness: 1.0, height: 1.0),
], Container(
baseColor: Colors.grey[900], alignment: Alignment.topLeft,
expandedColor: Colors.grey[850], padding: const EdgeInsets.all(8),
child: InfoRowGroup(dir.tags),
),
],
baseColor: Colors.grey[900],
expandedColor: Colors.grey[850],
),
); );
}, },
childCount: 1 + _metadata.length, childCount: 1 + _metadata.length,
@ -148,7 +154,6 @@ class _DirectoryTitle extends StatelessWidget {
child: Text( child: Text(
name, name,
style: const TextStyle( style: const TextStyle(
color: Colors.white,
shadows: [ shadows: [
Shadow( Shadow(
color: Colors.black, color: Colors.black,