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( return GridView.builder(
shrinkWrap: true, shrinkWrap: true,
itemCount: _data.length, itemCount: _data.length,
@ -97,6 +112,7 @@ class _OrdinalsListState extends ConsumerState<OrdinalsList> {
ordinal: _data[i], ordinal: _data[i],
), ),
); );
}
}, },
); );
} }

View file

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