SmartSelect<T> class

SmartSelect that allows you to easily convert your usual form selects to dynamic pages with grouped radio or checkbox inputs.

Inheritance

Constructors

SmartSelect.multiple({Key key, @required List<T> value, @required String title, @required List<SmartSelectOption<T>> options, @required SmartSelectOnChange<List<T>> onChange, String placeholder: 'Select one or more', Widget leading, Widget trailing, bool isTwoLine: false, bool isLoading: false, String loadingText: 'Loading..', bool enabled: true, bool selected: false, bool dense: false, EdgeInsetsGeometry padding, SmartSelectChoiceType choiceType: SmartSelectChoiceType.checkboxes, SmartSelectModalType modalType: SmartSelectModalType.fullPage, SmartSelectChoiceConfig<T> choiceConfig: const SmartSelectChoiceConfig(), SmartSelectModalConfig modalConfig: const SmartSelectModalConfig(), SmartSelectBuilder<T> builder})
Constructor for multiple choice
SmartSelect.single({Key key, @required T value, @required String title, @required List<SmartSelectOption<T>> options, @required SmartSelectOnChange<T> onChange, String placeholder: 'Select one', Widget leading, Widget trailing, bool isTwoLine: false, bool isLoading: false, String loadingText: 'Loading..', bool enabled: true, bool selected: false, bool dense: false, EdgeInsetsGeometry padding, SmartSelectChoiceType choiceType: SmartSelectChoiceType.radios, SmartSelectModalType modalType: SmartSelectModalType.fullPage, SmartSelectChoiceConfig<T> choiceConfig: const SmartSelectChoiceConfig(), SmartSelectModalConfig modalConfig: const SmartSelectModalConfig(), SmartSelectBuilder<T> builder})
Constructor for single choice

Properties

builder SmartSelectBuilder<T>
Builder for custom trigger widget
final
choiceConfig SmartSelectChoiceConfig<T>
Choice configuration
final
choiceType SmartSelectChoiceType
When isMultiChoice is true choiceType can use SmartSelectChoiceType.checkboxes or SmartSelectChoiceType.switches or SmartSelectChoiceType.chips and when isMultiChoice is false choiceType can use SmartSelectChoiceType.radios or SmartSelectChoiceType.chips
final
dense bool
Whether this list tile is part of a vertically dense list. [...]
final
enabled bool
Whether this list tile is interactive. [...]
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
isLoading bool
Whether the is intended to display loading stats.
final
isMultiChoice bool
Whether show the options list as single choice or multiple choice
final
isTwoLine bool
Whether this list tile is intended to display two lines of text.
final
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
leading Widget
A widget to display before the title. [...]
final
loadingText String
final
modalConfig SmartSelectModalConfig
Modal configuration
final
modalType SmartSelectModalType
Modal type
final
options List<SmartSelectOption<T>>
List of option item
final
padding EdgeInsetsGeometry
The tile's internal padding. [...]
final
placeholder String
The text displayed when the value is null
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selected bool
If this tile is also enabled then icons and text are rendered with the same color. [...]
final
title String
The primary content of the widget. Used in trigger widget and header option
final
trailing Widget
A widget to display after the title. [...]
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. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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
Returns a string representation of this object.
inherited
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug}) 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. [...]
@nonVirtual, inherited