PTextField class

Inheritance

Constructors

PTextField({TextEditingController controller, FocusNode focusNode, BoxDecoration iosDecoration, InputDecoration decoration, bool iOSMirrorVisualDecoration = true, OverlayVisibilityMode iosPrefixMode, OverlayVisibilityMode iosSuffixMode, OverlayVisibilityMode iosClearButtonMode, TextInputType iosKeyboardType, TextInputAction textInputAction, TextCapitalization textCapitalization = TextCapitalization.none, TextStyle style, StrutStyle strutStyle, TextAlign textAlign = TextAlign.start, ToolbarOptions toolbarOptions, TextAlignVertical textAlignVertical, bool readOnly = false, bool showCursor, bool autofocus = false, bool obscureText = false, bool autocorrect = 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 iosKeyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), bool enableInteractiveSelection = true, DragStartBehavior dragStartBehavior, ScrollController scrollController, ScrollPhysics scrollPhysics, GestureTapCallback onTap, Key key})

Properties

autocorrect bool
Whether to enable autocorrection. [...]
final
autofocus bool
Whether this text field should focus itself if nothing else is already focused. [...]
final
controller TextEditingController
final
cursorColor Color
final
cursorRadius Radius
How rounded the corners of the cursor should be. [...]
final
cursorWidth double
How thick the cursor will be. [...]
final
decoration InputDecoration
final
dragStartBehavior DragStartBehavior
Determines the way that drag start behavior is handled. [...]
final
enabled bool
final
enableInteractiveSelection bool
Whether to enable user interface affordances for changing the text selection. [...]
final
expands bool
Whether this widget's height will be sized to fill its parent. [...]
final
focusNode FocusNode
An optional focus node to use as the focus node for this widget. [...]
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
inputFormatters List<TextInputFormatter>
Optional input validation and formatting overrides. [...]
final
iosClearButtonMode OverlayVisibilityMode
final
iosDecoration BoxDecoration
final
iosKeyboardAppearance Brightness
final
iosKeyboardType TextInputType
The type of keyboard to use for editing the text. [...]
final
iOSMirrorVisualDecoration bool
If true, we try to map the InputDecoration decoration to iOS by converting OutlineInputBorder to a similar border on iOS. There may be more patches in the future.
final
iosPrefixMode OverlayVisibilityMode
final
iosSuffixMode OverlayVisibilityMode
final
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
maxLength int
final
maxLengthEnforced bool
final
maxLines int
The maximum number of lines for the text to span, wrapping if necessary. [...]
final
minLines int
The minimum number of lines to occupy when the content spans fewer lines. [...]
final
obscureText bool
Whether to hide the text being edited (e.g., for passwords). [...]
final
onChanged ValueChanged<String>
Called when the user initiates a change to the TextField's value: when they have inserted or deleted text. [...]
final
onEditingComplete VoidCallback
Called when the user submits editable content (e.g., user presses the "done" button on the keyboard). [...]
final
onSubmitted ValueChanged<String>
final
onTap GestureTapCallback
Called for each distinct tap except for every second tap of a double tap. [...]
final
readOnly bool
Whether the text can be changed. [...]
final
renderCupertino WidgetBuilder
Return the widget to construct for the TargetPlatform.iOS
read-only, override
renderFuchsia WidgetBuilder
Return the widget to construct for the TargetPlatform.fuschia. For now, this defaults to the material design components.
read-only, inherited
renderMaterial WidgetBuilder
Return the widget to construct for the TargetPlatform.android
read-only, override
renderPlatform TargetPlatform
Can specify a TargetPlatform on the fly on a per-widget basis. This is simpler than just wrapping a single widget in a PTheme widget.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scrollController ScrollController
The ScrollController to use when vertically scrolling the input. [...]
final
scrollPadding EdgeInsets
Configures padding to edges surrounding a Scrollable when the Textfield scrolls into view. [...]
final
scrollPhysics ScrollPhysics
final
selectionEnabled bool
read-only
showCursor bool
Whether to show cursor. [...]
final
strutStyle StrutStyle
final
style TextStyle
final
textAlign TextAlign
final
textAlignVertical TextAlignVertical
final
textCapitalization TextCapitalization
Configures how the platform keyboard will select an uppercase or lowercase keyboard. [...]
final
textInputAction TextInputAction
final
toolbarOptions ToolbarOptions
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget. [...]
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

Operators

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