Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt

Use this file to discover all available pages before exploring further.

Class Grid view of NFT cards for a wallet’s NFT collection.
class CrossmintNftCollectionView extends StatelessWidget
Pass the items from CrossmintWalletNftPage.items to nfts. By default every item is rendered with the Material-based CrossmintNftCard. Headless consumers that want to render items with their own design system can supply an itemBuilder — the collection view still owns the grid delegate, padding, and empty-state handling, but each tile is built by the supplied callback.

Constructors

CrossmintNftCollectionView

const CrossmintNftCollectionView({
  super.key,
  required this.nfts,
  this.onNftTap,
  this.crossAxisCount = 2,
  this.emptyBuilder,
  this.itemBuilder,
  this.padding,
})

Properties

nfts

final List<CrossmintNftRecord> nfts
NFT records to render in the grid. Pass CrossmintWalletNftPage.items here. When the list is empty the emptyBuilder (or the built-in empty state) is rendered instead.

onNftTap

final void Function(CrossmintNftRecord nft)? onNftTap
Called when the user taps a card. When null, cards are not tappable and no ripple is rendered. Both the default CrossmintNftCard and any custom itemBuilder receive the wired onTap automatically.

crossAxisCount

final int crossAxisCount
Number of columns in the grid. Defaults to 2.

emptyBuilder

final WidgetBuilder? emptyBuilder
Optional builder for the empty state, rendered when nfts is empty. When null, a built-in placeholder is rendered.

itemBuilder

final CrossmintNftItemBuilder? itemBuilder
Optional per-item builder. When null, items render with the Material CrossmintNftCard (React Native SDK parity default). When non-null, the builder is invoked for every NFT in nfts; the supplied onTap callback is wired to onNftTap so consumers do not have to re-derive the tap wiring in their custom card.

padding

final EdgeInsets? padding
Padding applied to the grid. Defaults to EdgeInsets.all(12) when null.

Methods

build

Widget build(BuildContext context)