mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
desktop ordinals in wrap
This commit is contained in:
parent
c2df7ea113
commit
6c6c9c8325
2 changed files with 35 additions and 16 deletions
|
@ -83,20 +83,36 @@ class _OrdinalsListState extends ConsumerState<OrdinalsList> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return GridView.builder(
|
if (Util.isDesktop) {
|
||||||
shrinkWrap: true,
|
return Wrap(
|
||||||
itemCount: _data.length,
|
spacing: _spacing,
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
runSpacing: _spacing,
|
||||||
crossAxisSpacing: _spacing,
|
children: _data
|
||||||
mainAxisSpacing: _spacing,
|
.map((e) => SizedBox(
|
||||||
crossAxisCount: Util.isDesktop ? 4 : 2,
|
width: 220,
|
||||||
childAspectRatio: 6 / 7, // was 3/4, less data displayed now
|
height: 270,
|
||||||
),
|
child: OrdinalCard(
|
||||||
itemBuilder: (_, i) => OrdinalCard(
|
walletId: widget.walletId,
|
||||||
walletId: widget.walletId,
|
ordinal: e,
|
||||||
ordinal: _data[i],
|
)))
|
||||||
),
|
.toList(),
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return GridView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemCount: _data.length,
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisSpacing: _spacing,
|
||||||
|
mainAxisSpacing: _spacing,
|
||||||
|
crossAxisCount: Util.isDesktop ? 4 : 2,
|
||||||
|
childAspectRatio: 6 / 7, // was 3/4, less data displayed now
|
||||||
|
),
|
||||||
|
itemBuilder: (_, i) => OrdinalCard(
|
||||||
|
walletId: widget.walletId,
|
||||||
|
ordinal: _data[i],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,8 +231,10 @@ class _DesktopOrdinals extends ConsumerState<DesktopOrdinalsView> {
|
||||||
height: 16,
|
height: 16,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: OrdinalsList(
|
child: SingleChildScrollView(
|
||||||
walletId: widget.walletId,
|
child: OrdinalsList(
|
||||||
|
walletId: widget.walletId,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue