KatMultiImagePickerScreen class

A grid-based picker for selecting multiple photos, backed by package:photo_manager's AssetEntity.

The app bar's add-photo action pushes galleryRouteName - the host app is expected to register that named route to let the user browse their photo library and return the chosen assets via Navigator.pop(context, List<KatAssetEntity>). The check action pops this screen with the currently picked assets.

Long-press an asset to enter selection mode, then tap assets to toggle their selection (highlighted in green). Scrolling to the bottom of an overflowing grid calls onLoadMore; pulling down calls onRefresh - both optional, for a host app that paginates or refreshes its own data.

Inheritance

Constructors

KatMultiImagePickerScreen({Key? key, List<KatAssetEntity> initialAssets = const [], String galleryRouteName = 'Gallery', String appBarTitle = 'Selected Image', String doneTooltip = 'Done', String addPhotoTooltip = 'Add photo', VoidCallback? onLoadMore, Future<void> onRefresh()?})
const

Properties

addPhotoTooltip String
final
appBarTitle String
final
doneTooltip String
final
galleryRouteName String
Named route pushed to browse the photo library; must return the chosen List<KatAssetEntity> via Navigator.pop.
final
hashCode int
The hash code for this object.
no setterinherited
initialAssets List<KatAssetEntity>
Assets already picked before this screen was shown, e.g. when resuming a previous selection.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onLoadMore VoidCallback?
Called at most once per scroll-to-bottom of an overflowing grid.
final
onRefresh Future<void> Function()?
Called when the user pulls down to refresh.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<KatMultiImagePickerScreen>
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