PickerGridItem class

Single grid cell — thumbnail + selection ring + duration badge for video. Telegram's MediaPickerGridItem shape: square aspect, ring at top-right with the 1-based pick index, video duration at bottom-left.

When the picker has a ComposeEntry for asset (because the user edited it during this picker session), the thumbnail paints the entry's renderedPreview instead of the gallery thumbnail — telegram parity: edits are visible in the grid until the picker pops.

Inheritance
Available extensions

Constructors

PickerGridItem({Key? key, required XAsset asset, required int cellSizePx, required SelectionContext selection, required ThumbnailCache cache, required Map<String, ComposeEntry> entriesById, required ValueChanged<XAsset> onTap, required PickerViewKind viewKind, required PickerSourceRegistry sourceRegistry})
Creates the cell of asset.
const

Properties

asset → XAsset
The asset shown.
final
cache → ThumbnailCache
Where the thumbnail loads from.
final
cellSizePx → int
Thumbnail size requested, in physical pixels.
final
entriesById → Map<String, ComposeEntry>
Compose entries by asset id; an edited asset shows its entry's preview.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap → ValueChanged<XAsset>
Called on a tap of the cell's body.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selection → SelectionContext
The picked assets, which number the ring.
final
sourceRegistry → PickerSourceRegistry
Where the cell records its transition source.
final
viewKind → PickerViewKind
Which view this cell lives in (grid or strip). The picker's transitionSourceFor closure consults _displayMode so the hero animation lands on whichever view is visible.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sliver({Key? key}) → Widget

Available on Widget, provided by the SliverExtension extension

Wraps this widget in a SliverToBoxAdapter.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited