BaseTextField class

use CupertinoTextField by cupertino *** use cupertino = { forceUseMaterial: true } force use TextField on cuperitno. use TextField by material *** use material = { forceUseCupertino: true } force use CupertinoTextField on material.

Inheritance

Constructors

BaseTextField({Key baseKey, Key key, TextEditingController controller, FocusNode focusNode, TextInputType keyboardType, TextInputAction textInputAction, TextCapitalization textCapitalization = TextCapitalization.none, TextStyle style, StrutStyle strutStyle, TextAlign textAlign = TextAlign.start, TextAlignVertical textAlignVertical, bool readOnly = false, bool showCursor, ToolbarOptions toolbarOptions, bool autofocus = false, bool obscureText = false, bool autocorrect = true, SmartDashesType smartDashesType, SmartQuotesType smartQuotesType, bool enableSuggestions = true, int maxLines = 1, int minLines, bool expands = false, int maxLength, bool maxLengthEnforced = true, ValueChanged<String> onChanged, VoidCallback onEditingComplete, ValueChanged<String> onSubmitted, List<TextInputFormatter> inputFormatters, bool enabled, double cursorWidth = 2.0, Radius cursorRadius = const Radius.circular(2.0), Color cursorColor, Brightness keyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), DragStartBehavior dragStartBehavior = DragStartBehavior.start, bool enableInteractiveSelection = true, ScrollController scrollController, ScrollPhysics scrollPhysics, BoxDecoration cupertinoDecoration = _kDefaultRoundedBorderDecoration, EdgeInsetsGeometry padding = const EdgeInsets.all(6.0), String placeholder, TextStyle placeholderStyle = const TextStyle(fontWeight: FontWeight.w400, color: CupertinoColors.placeholderText), Widget prefix, OverlayVisibilityMode prefixMode = OverlayVisibilityMode.always, Widget suffix, OverlayVisibilityMode suffixMode = OverlayVisibilityMode.always, OverlayVisibilityMode clearButtonMode = OverlayVisibilityMode.never, InputDecoration materialDecoration = const InputDecoration(), TextDirection textDirection, GestureTapCallback onTap, InputCounterWidgetBuilder buildCounter, Map<String, dynamic> cupertino, Map<String, dynamic> material})
const

Properties

autocorrect bool
CupertinoTextField.autocorrect or TextField.autocorrect
final
autofocus bool
CupertinoTextField.autofocus or TextField.autofocus
final
buildCounter InputCounterWidgetBuilder
TextField.buildCounter
final
clearButtonMode OverlayVisibilityMode
CupertinoTextField.clearButtonMode
final
controller TextEditingController
CupertinoTextField.controller or TextField.controller
final
cupertino Map<String, dynamic>
final, inherited
cupertinoDecoration BoxDecoration
*** general properties end *** *** cupertino properties start *** CupertinoTextField.cupertinoDecoration
final
cursorColor Color
CupertinoTextField.cursorColor or TextField.cursorColor
final
cursorRadius Radius
CupertinoTextField.cursorRadius or TextField.cursorRadius
final
cursorWidth double
CupertinoTextField.cursorWidth or TextField.cursorWidth
final
dragStartBehavior DragStartBehavior
CupertinoTextField.dragStartBehavior or TextField.dragStartBehavior
final
enabled bool
CupertinoTextField.enabled or TextField.enabled
final
enableInteractiveSelection bool
CupertinoTextField.enableInteractiveSelection or TextField.enableInteractiveSelection
final
enableSuggestions bool
CupertinoTextField.enableSuggestions or TextField.enableSuggestions
final
expands bool
CupertinoTextField.expands or TextField.expands
final
focusNode FocusNode
CupertinoTextField.focusNode or TextField.focusNode
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
inputFormatters List<TextInputFormatter>
CupertinoTextField.inputFormatters or TextField.inputFormatters
final
key Key
*** general properties start ***
final
keyboardAppearance Brightness
CupertinoTextField.keyboardAppearance or TextField.keyboardAppearance
final
keyboardType TextInputType
CupertinoTextField.keyboardType or TextField.keyboardType
final
material Map<String, dynamic>
final, inherited
materialDecoration InputDecoration
*** cupertino properties end *** *** material properties start *** TextField.materialDecoration
final
maxLength int
CupertinoTextField.maxLength or TextField.maxLength
final
maxLengthEnforced bool
CupertinoTextField.maxLengthEnforced or TextField.maxLengthEnforced
final
maxLines int
CupertinoTextField.maxLines or TextField.maxLines
final
minLines int
CupertinoTextField.minLines or TextField.minLines
final
obscureText bool
CupertinoTextField. or TextField.
final
onChanged ValueChanged<String>
CupertinoTextField.onChanged or TextField.onChanged
final
onEditingComplete VoidCallback
CupertinoTextField.onEditingComplete or TextField.onEditingComplete
final
onSubmitted ValueChanged<String>
CupertinoTextField.onSubmitted or TextField.onSubmitted
final
onTap GestureTapCallback
TextField.onTap
final
padding EdgeInsetsGeometry
CupertinoTextField.padding
final
placeholder String
CupertinoTextField.placeholder
final
placeholderStyle TextStyle
CupertinoTextField.placeholderStyle
final
prefix Widget
CupertinoTextField.prefix
final
prefixMode OverlayVisibilityMode
CupertinoTextField.prefixMode
final
readOnly bool
CupertinoTextField.readOnly or TextField.readOnly
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scrollController ScrollController
CupertinoTextField.scrollController or TextField.scrollController
final
scrollPadding EdgeInsets
CupertinoTextField.scrollPadding or TextField.scrollPadding
final
scrollPhysics ScrollPhysics
CupertinoTextField.scrollPhysics or TextField.scrollPhysics
final
showCursor bool
CupertinoTextField.showCursor or TextField.showCursor
final
smartDashesType SmartDashesType
CupertinoTextField.smartDashesType or TextField.smartDashesType
final
smartQuotesType SmartQuotesType
CupertinoTextField.smartQuotesType or TextField.smartQuotesType
final
strutStyle StrutStyle
CupertinoTextField.strutStyle or TextField.strutStyle
final
style TextStyle
CupertinoTextField.style or TextField.style
final
suffix Widget
CupertinoTextField.suffix
final
suffixMode OverlayVisibilityMode
CupertinoTextField.suffixMode
final
textAlign TextAlign
CupertinoTextField.textAlign or TextField.textAlign
final
textAlignVertical TextAlignVertical
CupertinoTextField.textAlignVertical or TextField.textAlignVertical
final
textCapitalization TextCapitalization
CupertinoTextField.textCapitalization or TextField.textCapitalization
final
textDirection TextDirection
TextField.textDirection
final
textInputAction TextInputAction
CupertinoTextField.textInputAction or TextField.textInputAction
final
toolbarOptions ToolbarOptions
CupertinoTextField.toolbarOptions or TextField.toolbarOptions
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget. [...]
inherited
buildBefore(BuildContext context) → void
build之前调用
inherited
buildByCupertino(BuildContext context) Widget
*** material properties end ***
override
buildByCupertinoBefore(BuildContext context) → void
buildByCupertino之前调用
inherited
buildByMaterial(BuildContext context) Widget
build on material mode
override
buildByMaterialBefore(BuildContext context) → void
buildByMaterial之前调用
inherited
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. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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
valueFromCupertino(String key, dynamic value) → dynamic
从cupertino获取key对应的值, 如果为null取value的值, 如果还是null则取material里的值
inherited
valueFromMap(Map<String, dynamic> map, String key, dynamic value) → dynamic
从cupertino获取key对应的值, 如果为null取value的值, 如果还是null则取material里的值
inherited
valueFromMaterial(String key, dynamic value) → dynamic
从material获取key对应的值, 如果为null取value的值, 如果还是null则取cupertino里的值
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited