desktop ordinals in wrap

This commit is contained in:
julian 2023-07-21 19:15:26 -06:00
parent c2df7ea113
commit 6c6c9c8325
2 changed files with 35 additions and 16 deletions

View file

@ -83,6 +83,21 @@ class _OrdinalsListState extends ConsumerState<OrdinalsList> {
);
}
if (Util.isDesktop) {
return Wrap(
spacing: _spacing,
runSpacing: _spacing,
children: _data
.map((e) => SizedBox(
width: 220,
height: 270,
child: OrdinalCard(
walletId: widget.walletId,
ordinal: e,
)))
.toList(),
);
} else {
return GridView.builder(
shrinkWrap: true,
itemCount: _data.length,
@ -97,6 +112,7 @@ class _OrdinalsListState extends ConsumerState<OrdinalsList> {
ordinal: _data[i],
),
);
}
},
);
}

View file

@ -117,6 +117,7 @@ class _DesktopOrdinals extends ConsumerState<DesktopOrdinalsView> {
body: Padding(
padding: const EdgeInsets.all(24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
@ -230,10 +231,12 @@ class _DesktopOrdinals extends ConsumerState<DesktopOrdinalsView> {
height: 16,
),
Expanded(
child: SingleChildScrollView(
child: OrdinalsList(
walletId: widget.walletId,
),
),
),
],
),
),