EJSelectorButton<T> class

Inheritance

Constructors

EJSelectorButton({Key? key, required List<EJSelectorItem<T>> items, T? value, bool useValue = true, Widget? hint, double dialogWidth = 80, double? dialogHeight, Widget buttonBuilder(Widget child, T? value)?, Widget selectedWidgetBuilder(T valueOfSelected)?, void onChange(T value)?, Widget? divider, VoidCallback? onTap, bool? alwaysShowScrollBar, bool disable = false, VoidCallback? onDisableTap})

Properties

alwaysShowScrollBar bool?
Indicates whether the scrollbar for the dialog should always be visible.
final
buttonBuilder → (Widget Function(Widget child, T? value)?)
Custom builder for the main widget of EJSelectorButton.
final
dialogHeight double?
The Height of the dialog which shows for select items.
final
dialogWidth double
The Width of the dialog which shows for select items.
final
disable bool
Disables the selector.
final
divider Widget?
Custom builder for divider between items in the dialog.
final
hashCode int
The hash code for this object.
no setterinherited
hint Widget?
A placeholder widget that is displayed by the button.
final
items List<EJSelectorItem<T>>
The list of items the user can select and it's can't be null.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChange → (void Function(T value)?)
Called when the user selects an item.
final
onDisableTap VoidCallback?
Called when the button is tapped and disable sets on true.
final
onTap VoidCallback?
Called when the button is tapped.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedWidgetBuilder → (Widget Function(T valueOfSelected)?)
Custom builder for selected item in dialog.
final
useValue bool
Specifies whether to use the value.
final
value → T?
The value of the currently selected EJSelectorItem.
final

Methods

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

Static Methods

string({Key? key, required List<String> items, String? value, bool useValue = true, String? hint, double dialogWidth = 80, double? buttonWidth, double? buttonHeight, double itemExtent = 50, void onChange(String)?, VoidCallback? onTap, Widget? divider, bool underline = true, TextStyle? textStyle, TextStyle? dialogTextStyle, TextStyle? hintStyle, Widget? suffix, Widget? prefix, TextOverflow? buttonTextOverFlow, Color underlineColor = Colors.grey, BoxDecoration? decoration, Alignment alignment = Alignment.center, EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 4), EdgeInsets margin = EdgeInsets.zero, bool alwaysShownScrollbar = false, bool disable = false, VoidCallback? onDisableTap}) EJSelectorButton<String>