improve transaction list performance (#3082)

* improve transaction list performance

* fix "no transactions" placeholder positioning

* format
This commit is contained in:
malik1004x
2026-03-14 14:31:50 +01:00
committed by GitHub
parent 9e88d4bf96
commit 2de86c80a8
11 changed files with 186 additions and 111 deletions
@@ -31,38 +31,40 @@ class _NFTListingPageState extends State<NFTListingPage> {
@override
Widget build(BuildContext context) {
return Observer(
builder: (context) {
return Column(
children: [
const SizedBox(height: 16),
Padding(
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
child: PrimaryButton(
text: S.current.import,
color: Theme.of(context).colorScheme.surfaceContainer,
textColor: Theme.of(context).colorScheme.onSecondaryContainer,
onPressed: () => Navigator.pushNamed(
context,
Routes.importNFTPage,
arguments: widget.nftViewModel,
),
),
),
if (widget.nftViewModel.isLoading)
Center(
child: CircularProgressIndicator(
backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest,
valueColor: AlwaysStoppedAnimation<Color>(
Theme.of(context).colorScheme.primary,
return SliverToBoxAdapter(
child: Observer(
builder: (context) {
return Column(
children: [
const SizedBox(height: 16),
Padding(
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
child: PrimaryButton(
text: S.current.import,
color: Theme.of(context).colorScheme.surfaceContainer,
textColor: Theme.of(context).colorScheme.onSecondaryContainer,
onPressed: () => Navigator.pushNamed(
context,
Routes.importNFTPage,
arguments: widget.nftViewModel,
),
),
)
else
NFTListWidget(nftViewModel: widget.nftViewModel)
],
);
},
),
if (widget.nftViewModel.isLoading)
Center(
child: CircularProgressIndicator(
backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest,
valueColor: AlwaysStoppedAnimation<Color>(
Theme.of(context).colorScheme.primary,
),
),
)
else
NFTListWidget(nftViewModel: widget.nftViewModel)
],
);
},
),
);
}
}