S2State<T> class
Null safety
Smart Select State
- Inheritance
-
- Object
- State<
SmartSelect< T> > - S2State
- Implementers
Constructors
- S2State()
Properties
- builder → dynamic
-
Returns the builders collection
read-only
- choiceActiveStyle → S2ChoiceStyle?
-
Returns the active choice style
read-only
- choiceConfig → S2ChoiceConfig
-
Returns the choice config
read-only
- choiceEmpty → Widget
-
Returns the choice empty widget
read-only
- choiceList → Widget
-
Returns the choice items widget
read-only
-
choiceListBuilder
→ S2ChoiceListBuilder<
T> -
Returns the choice item builder by it's current state
read-only
- choiceProgress → Widget
-
Returns the indicator widget indicates the choices is processing
read-only
-
choiceResolver
→ S2ChoiceResolver<
T> -
Returns the default choice builder by its type
read-only
-
choices
↔ S2Choices<
T> ? -
State of the choice items
read / write
- choiceSelectorAll → Widget?
-
Returns the choices selector widget
read-only
- choiceStyle → S2ChoiceStyle?
-
Returns the choice style
read-only
- confirmButton → Widget
-
Returns the confirm button widget
read-only
- context → BuildContext
-
The location in the tree where this widget builds.
read-onlyinherited
- customChoiceEmpty → Widget?
-
Returns the custom empty choice widget
read-only
- customConfirmButton → Widget?
-
Returns the custom confirm button widget
read-only
- customModal → Widget?
-
Returns the custom modal widget
read-only
-
customModalActions
→ List<
Widget> ? -
Returns the custom modal actions widgets
read-only
- customModalFilter → Widget?
-
Returns the custom modal filter widget
read-only
- customModalFilterToggle → Widget?
-
Returns the custom widget to show/hide modal filter
read-only
- customModalHeader → Widget?
-
Returns the custom modal header
read-only
- debouncer → Debouncer
-
Debouncer used in search text on changed
final
- defaultActiveChoiceStyle → S2ChoiceStyle
-
Returns the default style for selected choice
read-only
- defaultChoiceEmpty → Widget
-
Returns the default choice empty widget
read-only
- defaultChoiceStyle → S2ChoiceStyle
-
Returns the default style for unselected choice
read-only
- defaultConfirmButton → Widget
-
Returns the default confirm button widget
read-only
- defaultModal → Widget
-
Returns the default modal widget
read-only
-
defaultModalActions
→ List<
Widget> -
Returns the default modal actions widgets
read-only
- defaultModalFilter → Widget
-
Returns the default modal filter widget
read-only
- defaultModalFilterToggle → Widget
-
Returns the default widget to show/hide modal filter
read-only
- defaultModalHeader → Widget
-
Returns the default modal header widget
read-only
- defaultTile → Widget
-
Returns the default trigger tile widget
read-only
- filter ↔ S2Filter?
-
State of the filter operation
read / write
- groupConfig → S2GroupConfig
-
Returns the group config
read-only
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- isMultiChoice → bool
-
Returns
true
if the widget is multiple choiceread-only - isSingleChoice → bool
-
Returns
true
if the widget is single choiceread-only - modal → Widget
-
Returns the modal widget
read-only
-
modalActions
→ List<
Widget> -
Returns the modal action widgets
read-only
- modalBody → Widget
-
Returns the modal body widget
read-only
- modalConfig → S2ModalConfig
-
Returns the modal config
read-only
- modalContext ↔ BuildContext
-
Context of the modal
read / write
- modalDivider → Widget?
-
Returns the modal divider widget
read-only
- modalError → Widget
-
Returns the modal error widget
read-only
- modalErrorController ↔ S2TextErrorController
-
read / write
- modalFilter → Widget
-
Returns the modal filter widget
read-only
- modalFilterToggle → Widget?
-
Returns the widget to show/hide modal filter
read-only
-
Returns the modal footer widget
read-only
- modalHeader → Widget?
-
Returns the modal header widget
read-only
- modalHeaderStyle → S2ModalHeaderStyle
-
Returns the modal header style
read-only
- modalSetState ↔ StateSetter?
-
State setter of the modal
read / write
- modalStyle → S2ModalStyle
-
Returns the modal style
read-only
- modalTitle → Widget
-
Returns the modal title widget
read-only
- modalValidation → dynamic
-
Returns the validation function to validate the selection made in the modal, if
null
fallback to validationread-only - mounted → bool
-
Whether this State object is currently in a tree.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
selected
→ S2Selected<
T> -
State of the selected choice(s)
read-only
-
selection
↔ S2Selection<
T> ? -
State of choice(s) selection in the modal
covariantread / write
- theme → ThemeData
-
Returns ThemeData from the widget context
read-only
- title → String?
-
Returns the text used as title in trigger tile
read-only
- titleWidget → Widget
-
Returns title in
Text
widgetread-only - validation → dynamic
-
Returns the validation function to validate the selected choice
read-only
-
widget
→ SmartSelect<
T> -
The current configuration.
read-onlyinherited
Methods
-
activate(
) → void -
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
choiceBuilder(
S2Choice< T> choice) → Widget? - Returns the choice item builder from resolver by it's type
-
choiceSecondary(
S2Choice< T> choice) → Widget? - Returns the secondary/avatar widget
-
choiceSelector(
List< S2Choice< ? values) → Widget?T> > - Function to create toggle selector checkbox widget
-
choiceSubtitle(
S2Choice< T> choice) → Widget? - Returns the choice subtitle widget
-
choiceTitle(
S2Choice< T> choice) → Widget? - Returns the choice title widget
-
closeModal(
{bool confirmed = true}) → void - Function to close the choice modal
-
customGroup(
S2Group< T> group) → Widget? - Returns the custom grouped choices widget
-
customGroupHeader(
S2Group< T> group) → Widget? - Returns the custom group header widget
-
deactivate(
) → void -
Called when this object is removed from the tree.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
defaultChoiceSubtitle(
S2Choice< T> choice) → Widget - Returns the default choice subtitle widget
-
defaultChoiceTitle(
S2Choice< T> choice) → Widget - Returns the default choice title widget
-
defaultGroup(
S2Group< T> group) → Widget - Returns the default grouped choices widget
-
defaultGroupHeader(
S2Group< T> group) → Widget - Returns the default group header widget
-
defaultModalWillClose(
) → Future< bool> -
didChangeDependencies(
) → void -
Called when a dependency of this State object changes.
inherited
-
didUpdateWidget(
covariant SmartSelect< T> oldWidget) → void -
Called whenever the widget configuration changes.
override
-
dispose(
) → void -
Called when this object is removed from the tree permanently.
override
-
groupChoices(
S2Group< T> group) → Widget - Returns the group choices widget
-
groupCounter(
S2Group< T> group) → Widget - Returns the group counter widget
-
groupedChoices(
List< S2Group< groups) → WidgetT> > - Returns the grouped choice items widget
-
groupHeader(
S2Group< T> group) → Widget - Returns the group header widget
-
initializeFilter(
) → void - Function to initialize filter
-
initState(
) → void -
Called when this object is inserted into the tree.
override
-
modalErrorShake(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
onChange(
) → void - Called when the modal closed and selection has confirmed
-
onModalClose(
bool confirmed) → void - Called when modal closed
-
onModalOpen(
) → void - Called when modal opened
-
onModalWillClose(
) → Future< bool> - Called when modal closed
-
onModalWillOpen(
) → Future< bool> ? - Called when modal opened
-
onSelect(
S2Choice< T> choice) → void - Called when selection has made
-
reassemble(
) → void -
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
-
resolveChoices(
) → void - Function to resolve the choices
-
resolveSelected(
) → void - Initiate the selected choice
-
resolveSelection(
) → void - Function to resolve the selected
-
selectedHandler(
) → void - The selected listener handler
-
selectionHandler(
) → void - The selection listener handler
-
setState(
VoidCallback fn) → void -
Notify the framework that the internal state of this object has changed.
override
-
showModal(
) → void - Function to show the choice modal
-
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
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
-
ungroupedChoices(
List< S2Choice< ? choiceList) → WidgetT> > - Returns the ungrouped choice items widget
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited