info: styled tags as buttons

This commit is contained in:
Thibault Deckers 2019-12-28 01:24:57 +09:00
parent d42ad00688
commit b3a21da574

View file

@ -24,25 +24,29 @@ class XmpTagSection extends AnimatedWidget {
children: [ children: [
const SectionRow('XMP Tags'), const SectionRow('XMP Tags'),
Wrap( Wrap(
children: tags spacing: 8,
.map((tag) => Padding( children: tags.map((tag) {
padding: const EdgeInsets.symmetric(horizontal: 4.0), final borderColor = Theme.of(context).accentColor;
child: ActionChip( return OutlineButton(
label: Text(tag), onPressed: () => Navigator.push(
onPressed: () => Navigator.push( context,
context, MaterialPageRoute(
MaterialPageRoute( builder: (context) => FilteredCollectionPage(
builder: (context) => FilteredCollectionPage( collection: collection,
collection: collection, filter: (entry) => entry.xmpSubjects.contains(tag),
filter: (entry) => entry.xmpSubjects.contains(tag), title: tag,
title: tag, ),
), ),
), ),
), borderSide: BorderSide(
backgroundColor: Theme.of(context).accentColor, color: borderColor,
), ),
)) shape: RoundedRectangleBorder(
.toList(), borderRadius: BorderRadius.circular(42),
),
child: Text(tag),
);
}).toList(),
), ),
], ],
); );