AvatarFrameSelector class

Lazy grid of avatar frames to pick from, each previewed on the caller's own avatar. Presentation-only: the caller owns the option list, unlock state and persistence of the choice.

Tapping the already-selected frame does nothing. Tapping a locked frame calls onLockedTap and never changes the selection.

Inheritance

Constructors

AvatarFrameSelector({Key? key, required List<AvatarFrameOption> options, required Widget previewChild, required ValueChanged<String> onSelect, ValueChanged<String>? onLockedTap, String? selectedId, String selectedLabel = 'In use', String lockedLabel = 'Locked', String emptyMessage = 'No frames available', double maxGridHeight = 360, bool expand = false})

Properties

emptyMessage → String
final
expand → bool
Fill the parent's bounded height instead of sizing to the content. The parent must provide a bounded height; maxGridHeight is ignored.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lockedLabel → String
final
maxGridHeight → double
Upper bound for the grid height when expand is false.
final
onLockedTap → ValueChanged<String>?
Called with the id of a locked frame. When null, locked frames are inert.
final
onSelect → ValueChanged<String>
final
options → List<AvatarFrameOption>
final
previewChild → Widget
Avatar content shown inside every preview frame (image, icon, initials).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedId → String?
final
selectedLabel → String
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<AvatarFrameSelector>
Creates the mutable state for this widget at a given location in the tree.
override
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
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