SelectionSheetView<T> class

An embeddable single- or multi-selection workflow.

Unlike the modal helpers, this widget does not create or close a route. Use onSelected, onSelectionChanged, and onConfirmed to receive changes. The modal helpers use the same widget internally.

Inheritance

Constructors

SelectionSheetView.multi({required SelectionItemLabelBuilder<T> itemLabelBuilder, List<T>? items, SelectionSheetPageLoader<T>? loadItems, int pageSize = 20, String? title, Iterable<T> initialSelection = const [], bool searchable = false, Duration? searchDebounceDuration, String? searchHintText, SelectionSheetSearchFieldBuilder? searchFieldBuilder, String? doneLabel, SelectionSheetItemBuilder<T>? itemBuilder, bool isItemEnabled(T item)?, SelectionItemEquality<T>? itemEquals, SelectionItemKeyBuilder<T>? itemKeyBuilder, SelectionSheetSectionBuilder<T>? sectionBuilder, SelectionSheetSectionLabelBuilder? sectionLabelBuilder, SelectionSheetSectionHeaderBuilder? sectionHeaderBuilder, bool stickySectionHeaders = true, bool? showDragHandle, SelectionSheetDragHandleBuilder? dragHandleBuilder, SelectionSheetLayout? layout, SliverGridDelegate? gridDelegate, bool? showSelectedChips, bool enablePullToRefresh = true, SelectionSheetSelectedChipBuilder<T>? selectedChipBuilder, SelectionSheetLoadingBuilder? loadingBuilder, SelectionSheetEmptyBuilder? emptyBuilder, SelectionSheetErrorBuilder? errorBuilder, SelectionSheetLoadingBuilder? loadingMoreBuilder, SelectionSheetErrorBuilder? loadMoreErrorBuilder, SelectionSheetController? controller, SelectionSheetThemeData? theme, ScrollController? scrollController, ValueChanged<List<T>>? onSelectionChanged, ValueChanged<List<T>>? onConfirmed, GestureDragUpdateCallback? onDragHandleUpdate, GestureDragEndCallback? onDragHandleEnd, bool popOnComplete = false, Key? key})
Creates an embeddable multi-selection workflow.
const
SelectionSheetView.single({required SelectionItemLabelBuilder<T> itemLabelBuilder, List<T>? items, SelectionSheetPageLoader<T>? loadItems, int pageSize = 20, String? title, T? initialValue, bool searchable = false, Duration? searchDebounceDuration, String? searchHintText, SelectionSheetSearchFieldBuilder? searchFieldBuilder, SelectionSheetItemBuilder<T>? itemBuilder, bool isItemEnabled(T item)?, SelectionItemEquality<T>? itemEquals, SelectionItemKeyBuilder<T>? itemKeyBuilder, SelectionSheetSectionBuilder<T>? sectionBuilder, SelectionSheetSectionLabelBuilder? sectionLabelBuilder, SelectionSheetSectionHeaderBuilder? sectionHeaderBuilder, bool stickySectionHeaders = true, bool? showDragHandle, SelectionSheetDragHandleBuilder? dragHandleBuilder, SelectionSheetLayout? layout, SliverGridDelegate? gridDelegate, bool enablePullToRefresh = true, SelectionSheetLoadingBuilder? loadingBuilder, SelectionSheetEmptyBuilder? emptyBuilder, SelectionSheetErrorBuilder? errorBuilder, SelectionSheetLoadingBuilder? loadingMoreBuilder, SelectionSheetErrorBuilder? loadMoreErrorBuilder, SelectionSheetController? controller, SelectionSheetThemeData? theme, ScrollController? scrollController, ValueChanged<T>? onSelected, GestureDragUpdateCallback? onDragHandleUpdate, GestureDragEndCallback? onDragHandleEnd, bool popOnComplete = false, Key? key})
Creates an embeddable single-selection workflow.
const

Properties

controller SelectionSheetController?
final
doneLabel String?
final
dragHandleBuilder SelectionSheetDragHandleBuilder?
final
emptyBuilder SelectionSheetEmptyBuilder?
final
enablePullToRefresh bool
final
errorBuilder SelectionSheetErrorBuilder?
final
gridDelegate SliverGridDelegate?
final
hashCode int
The hash code for this object.
no setterinherited
initialSelection Iterable<T>
final
initialValue → T?
final
isItemEnabled bool Function(T item)?
final
isMulti bool
final
isRemote bool
no setter
itemBuilder SelectionSheetItemBuilder<T>?
final
itemEquals SelectionItemEquality<T>?
final
itemKeyBuilder SelectionItemKeyBuilder<T>?
final
itemLabelBuilder SelectionItemLabelBuilder<T>
final
items List<T>?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layout SelectionSheetLayout?
final
loadingBuilder SelectionSheetDragHandleBuilder?
final
loadingMoreBuilder SelectionSheetDragHandleBuilder?
final
loadItems SelectionSheetPageLoader<T>?
final
loadMoreErrorBuilder SelectionSheetErrorBuilder?
final
onConfirmed ValueChanged<List<T>>?
final
onDragHandleEnd GestureDragEndCallback?
final
onDragHandleUpdate GestureDragUpdateCallback?
final
onSelected ValueChanged<T>?
final
onSelectionChanged ValueChanged<List<T>>?
final
pageSize int
final
popOnComplete bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
final
searchable bool
final
searchDebounceDuration Duration?
final
searchFieldBuilder SelectionSheetSearchFieldBuilder?
final
searchHintText String?
final
sectionBuilder SelectionSheetSectionBuilder<T>?
final
sectionHeaderBuilder SelectionSheetSectionHeaderBuilder?
final
sectionLabelBuilder SelectionSheetSectionLabelBuilder?
final
selectedChipBuilder SelectionSheetSelectedChipBuilder<T>?
final
showDragHandle bool?
final
showSelectedChips bool?
final
stickySectionHeaders bool
final
theme SelectionSheetThemeData?
final
title String?
final

Methods

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