MiuixTextField class

Miuix 风格的文本输入框。对应 Kotlin TextField。

Inheritance

Constructors

MiuixTextField({Key? key, TextEditingController? controller, FocusNode? focusNode, ValueChanged<String>? onChanged, String label = '', bool useLabelAsPlaceholder = false, bool enabled = true, bool readOnly = false, TextStyle? textStyle, Widget? leadingIcon, Widget? trailingIcon, bool singleLine = false, int? maxLines, int? minLines, MiuixTextFieldColors? colors, double cornerRadius = MiuixTextFieldDefaults.cornerRadius, EdgeInsets insideMargin = MiuixTextFieldDefaults.insideMargin, TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization textCapitalization = TextCapitalization.none, ValueChanged<String>? onSubmitted, bool obscureText = false, Color? cursorColor, bool autofocus = false})
const

Properties

autofocus → bool
挂载后是否自动聚焦并唤起键盘(常用于对话框内的输入框)。
final
colors → MiuixTextFieldColors?
final
controller → TextEditingController?
final
cornerRadius → double
final
cursorColor → Color?
final
enabled → bool
final
focusNode → FocusNode?
final
hashCode → int
The hash code for this object.
no setterinherited
insideMargin → EdgeInsets
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType → TextInputType?
final
label → String
final
leadingIcon → Widget?
final
maxLines → int?
final
minLines → int?
final
obscureText → bool
final
onChanged → ValueChanged<String>?
final
onSubmitted → ValueChanged<String>?
键盘 action 触发时回调。对应 Kotlin onKeyboardAction / keyboardActions。
final
readOnly → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
singleLine → bool
final
textCapitalization → TextCapitalization
输入大小写策略。对应 Kotlin keyboardOptions.capitalization。
final
textInputAction → TextInputAction?
键盘 action 按钮类型。对应 Kotlin keyboardOptions.imeAction。
final
textStyle → TextStyle?
final
trailingIcon → Widget?
final
useLabelAsPlaceholder → bool
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<MiuixTextField>
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, int wrapWidth = 65}) → 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