feat(app): gallery switches between grid and thumbnail list, and each artifact or document group is collapsible with a pinned title
This commit is contained in:
@@ -19,8 +19,12 @@ class ArtifactDocumentSection extends StatelessWidget {
|
||||
required this.group,
|
||||
this.selectedIdentity,
|
||||
this.onSelected,
|
||||
this.showHeader = true,
|
||||
});
|
||||
|
||||
/// False when a collapsible title above already names the section.
|
||||
final bool showHeader;
|
||||
|
||||
final ArtifactGroup group;
|
||||
final String? selectedIdentity;
|
||||
final ArtifactSelected? onSelected;
|
||||
@@ -30,6 +34,12 @@ class ArtifactDocumentSection extends StatelessWidget {
|
||||
final rows = <Widget>[
|
||||
for (final document in group.documents) _row(document),
|
||||
];
|
||||
if (!showHeader) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: rows,
|
||||
);
|
||||
}
|
||||
if (usesCupertinoHost(context)) {
|
||||
return CupertinoListSection.insetGrouped(
|
||||
header: Semantics(
|
||||
|
||||
Reference in New Issue
Block a user