info: fixed metadata expansion panel list
This commit is contained in:
parent
5771f5e20c
commit
b48dc4cd56
1 changed files with 23 additions and 19 deletions
|
@ -65,28 +65,32 @@ class _MetadataSectionSliverState extends State<MetadataSectionSliver> with Auto
|
||||||
final directoriesWithoutTitle = _metadata.where((dir) => dir.name.isEmpty);
|
final directoriesWithoutTitle = _metadata.where((dir) => dir.name.isEmpty);
|
||||||
final directoriesWithTitle = _metadata.where((dir) => dir.name.isNotEmpty);
|
final directoriesWithTitle = _metadata.where((dir) => dir.name.isNotEmpty);
|
||||||
return SliverList(
|
return SliverList(
|
||||||
delegate: SliverChildListDelegate.fixed(
|
delegate: SliverChildListDelegate(
|
||||||
[
|
[
|
||||||
const SectionRow('Metadata'),
|
const SectionRow('Metadata'),
|
||||||
...directoriesWithoutTitle.map((dir) => InfoRowGroup(dir.tags)),
|
...directoriesWithoutTitle.map((dir) => InfoRowGroup(dir.tags)),
|
||||||
ExpansionPanelList.radio(
|
Theme(
|
||||||
expandedHeaderPadding: EdgeInsets.zero,
|
data: Theme.of(context).copyWith(cardColor: Colors.grey[900]),
|
||||||
children: directoriesWithTitle.map<ExpansionPanelRadio>((dir) {
|
child: ExpansionPanelList.radio(
|
||||||
return ExpansionPanelRadio(
|
key: ValueKey(widget.entry.uri),
|
||||||
value: dir.name,
|
expandedHeaderPadding: EdgeInsets.zero,
|
||||||
canTapOnHeader: true,
|
children: directoriesWithTitle.map<ExpansionPanelRadio>((dir) {
|
||||||
headerBuilder: (BuildContext context, bool isExpanded) {
|
return ExpansionPanelRadio(
|
||||||
return ListTile(
|
value: dir.name,
|
||||||
title: _DirectoryTitle(dir.name),
|
canTapOnHeader: true,
|
||||||
);
|
headerBuilder: (BuildContext context, bool isExpanded) {
|
||||||
},
|
return ListTile(
|
||||||
body: Container(
|
title: _DirectoryTitle(dir.name),
|
||||||
alignment: Alignment.topLeft,
|
);
|
||||||
padding: const EdgeInsets.all(8),
|
},
|
||||||
child: InfoRowGroup(dir.tags),
|
body: Container(
|
||||||
),
|
alignment: Alignment.topLeft,
|
||||||
);
|
padding: const EdgeInsets.all(8),
|
||||||
}).toList(),
|
child: InfoRowGroup(dir.tags),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue