ThemedSelectInput<T> class

Inheritance

Constructors

ThemedSelectInput({Key? key, String? labelText, Widget? label, required List<ThemedSelectItem<T>> items, void onChanged(ThemedSelectItem<T>?)?, IconData? prefixIcon, String? prefixText, VoidCallback? onPrefixTap, T? value, bool filter(String, ThemedSelectItem<T>)?, bool enableSearch = true, bool disabled = false, List<String> errors = const [], bool hideDetails = false, bool hideTitle = false, bool autoclose = true, bool isRequired = false, bool dense = false, EdgeInsets? padding, TextInputType searchKeyboardType = TextInputType.text, Map<String, String> translations = const {'actions.cancel' : 'Cancel', 'actions.save' : 'Save', 'layrz.select.search' : 'Search in the list', 'layrz.select.empty' : 'No item found'}, bool overridesLayrzTranslations = false, bool hideButtons = false, Widget? customChild, Color hoverColor = Colors.transparent, Color focusColor = Colors.transparent, Color splashColor = Colors.transparent, Color highlightColor = Colors.transparent, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)), bool canUnselect = false, bool returnNullOnClose = false, bool autoSelectFirst = false, BoxConstraints? dialogContraints = const BoxConstraints(maxWidth: 500, maxHeight: 500)})
ThemedSelectInput is the input for selecting an item from a list.
const

Properties

autoclose bool
autoclose is the flag to close the input when an item is selected.
final
autoSelectFirst bool
autoSelectFirst is the flag to auto select the first item of the list. Only will apply when value is null and it's the first render of the object (when the initState is called).
final
borderRadius BorderRadius
borderRadius is the border radius of the input. Only will affect when customChild is submitted. By default, it will use BorderRadius.circular(10).
final
canUnselect bool
canUnselect is the flag to allow unselecting an item.
final
customChild Widget?
customChild is the custom widget to be displayed. Replaces the ThemedTextInput widget.
final
dense bool
dense is the flag to make the input dense.
final
dialogContraints BoxConstraints?
dialogContraints is the constraints of the dialog.
final
disabled bool
disabled is the flag to disable the input.
final
enableSearch bool
enableSearch is the flag to enable the search input.
final
errors List<String>
errors is the list of errors to be displayed.
final
filter → (bool Function(String, ThemedSelectItem<T>)?)
filter is the callback to filter the items.
final
focusColor Color
focusColor is the focus color of the input. Only will affect when customChild is submitted. By default, it will use Colors.transparent.
final
hashCode int
The hash code for this object.
no setterinherited
hideButtons bool
hideButtons is the flag to hide the buttons of the input.
final
hideDetails bool
hideDetails is the flag to hide the details of the input.
final
hideTitle bool
hideTitle is the flag to hide the title of the input. Important, when this property is true, automatically the search field is disabled.
final
highlightColor Color
highlightColor is the highlight color of the input. Only will affect when customChild is submitted. By default, it will use Colors.transparent.
final
hoverColor Color
hoverColor is the hover color of the input. Only will affect when customChild is submitted. By default, it will use Colors.transparent.
final
isRequired bool
isRequired is the flag to mark the input as required.
final
items List<ThemedSelectItem<T>>
items is the list of items to be selected.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label Widget?
label is the label of the input. Avoid using this if you are using labelText instead.
final
labelText String?
labelText is the label of the input. Avoid using this if you are using label instead.
final
onChanged → (void Function(ThemedSelectItem<T>?)?)
onPrefixTap is the callback when the prefix is tapped.
final
onPrefixTap VoidCallback?
prefixText is the text to be displayed at the start of the input.
final
overridesLayrzTranslations bool
overridesLayrzTranslations is the flag to override the default translations of Layrz.
final
padding EdgeInsets?
emptyListText is the text to be displayed when the list is empty.
final
prefixIcon IconData?
onChanged is the callback when the input value changes.
final
prefixText String?
prefixIcon is the icon to be displayed at the start of the input.
final
returnNullOnClose bool
returnNullOnClose is the flag to return null when the dialog is closed and isn't selected something and/or have a value.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchKeyboardType TextInputType
searchKeyboardType is the keyboard type of the search input.
final
splashColor Color
splashColor is the splash color of the input. Only will affect when customChild is submitted. By default, it will use Colors.transparent.
final
translations Map<String, String>
translations is the translations of the input. By default we use LayrzAppLocalizations for translations, but you can submit your own translations using this property. Consider when LayrzAppLocalizations is present, is the default value of this property. Required translations:
final
value → T?
value is the value of the input.
final

Methods

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