FutureComboBox<T> class
A combobox with no items and displaying an loading indicator in place of the selected item.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FutureComboBox
Constructors
-
FutureComboBox({Key? key, required Future<
Set< options, required Widget itemBuilder(T item), required FutureOr<T> >bool?> onSelected(T item), Widget onError(Object error)?, String? label, Widget loaderBuilder()?, VitComboBoxStyle? style}) -
A combobox displaying a progress indicator while the future
options
is not completed.const - FutureComboBox.eternal({String? label, Widget loaderBuilder()?, VitComboBoxStyle? style})
-
A combobox that a future that only finishes after a day.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemBuilder → Widget Function(T item)
-
The builder function used to create each item of the combo box.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
A text displayed at the top of the combobox.
final
- loaderBuilder → Widget Function()?
-
The function used to build the widget while the future is in progress.
final
- onError → Widget Function(Object error)?
-
A function used to display an error in case options future throws an
exception.
final
-
onSelected
→ FutureOr<
bool?> Function(T item) -
A function called when the item is selected.
final
-
options
→ Future<
Set< T> > -
A future that results in the options for the combobox.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → VitComboBoxStyle?
-
The style used to decorate the component.
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.
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}) → 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