PopupSelectField class

PopupSelectField

텍스트 필드를 누르면 팝업창이 뜨고, 목록한 값들 중에서 하나를 선택 할 수 있도록 하는 텍스트 필드형 위젯 PopupTextField 와 비슷한 UI 로 표현하고자 할 때 사용 할 수 있으며, 팝업창에서 목록한 값들 중에서 하나를 선택할 수 있다.

label 필드의 라벨

typeHint 필드의 타입힌트 필드에 아무것도 입력되지 않았을 때 표시되는 텍스트. 무언가를 선택하거나, 옵션에서 initialValue가 지정되면 사라진다. PopupTextField 와는 다르게, typeHint 는 팝업창에서 설명으로 사용된다.

initialValue 필드의 초기값 필드에 표시되는 초기값. 팝업창에서 기본적으로 이 값이 선택되어져 보인다.

onChange 선택된 값이 변경될 때 호출되는 콜백함수

items value 와 label 로 이루어진 목록. 선택 목록에 label 이 보이고, 실제 값은 value 가 된다.

Inheritance

Constructors

PopupSelectField({Key? key, required String label, required String typeHint, String? initialValue, required List<Map<String, String>> items, required void onChange(String)})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
initialValue String?
final
items List<Map<String, String>>
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String
final
onChange → void Function(String)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeHint String
final

Methods

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