InputField class

Inheritance
Available extensions

Constructors

InputField({Key? key, TextEditingController? controller, String? initialValue, String? hintText, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, TextInputType? keyboardType, TextInputAction? textInputAction, bool obscureText = false, bool readOnly = false, bool enabled = true, IconData? prefixIcon, IconData? suffixIcon, VoidCallback? onSuffixTap, String? errorText, List<TextInputFormatter>? inputFormatters})
const
InputField.email({Key? key, TextEditingController? controller, String hintText = 'Email', ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, String? errorText, bool enabled = true})
factory
InputField.number({Key? key, TextEditingController? controller, String hintText = 'Number', ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, String? errorText, bool enabled = true})
factory
InputField.password({Key? key, TextEditingController? controller, String hintText = 'Password', ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, String? errorText, bool enabled = true})
🔍 Named constructor
factory
InputField.phone({Key? key, TextEditingController? controller, String hintText = 'Phone number', ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, String? errorText, bool enabled = true})
factory
InputField.search({Key? key, TextEditingController? controller, String hintText = 'Search', ValueChanged<String>? onChanged, VoidCallback? onFilterTap})
factory

Properties

box → Container

Available on Widget, provided by the WidgetToBox extension

no setter
controller → TextEditingController?
final
enabled → bool
final
errorText → String?
❗ Error without layout jump
final
hashCode → int
The hash code for this object.
no setterinherited
hintText → String?
final
initialValue → String?
final
inputFormatters → List<TextInputFormatter>?
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType → TextInputType?
final
obscureText → bool
final
onChanged → ValueChanged<String>?
final
onSubmitted → ValueChanged<String>?
final
onSuffixTap → VoidCallback?
final
prefixIcon → IconData?
final
readOnly → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
suffixIcon → IconData?
final
textInputAction → TextInputAction?
final

Methods

aligned([AlignmentGeometry alignment = Alignment.center]) → Widget

Available on Widget, provided by the WidgetStackExtensions extension

Wraps the widget in an Align widget
asColumn({MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start}) → Widget

Available on Widget, provided by the ColumnWidget extension

blurEffect({double blur = 10.0, double borderRadius = 12.0, Border? border, Color? tint, Gradient? gradient, List<BoxShadow>? shadow, Clip clipBehavior = Clip.antiAlias, EdgeInsetsGeometry? padding}) → Widget

Available on Widget, provided by the BlurEffectWidget extension

center() → Widget

Available on Widget, provided by the CenterWidget extension

centered() → Widget

Available on Widget, provided by the WidgetStackExtensions extension

Wraps the widget in a Center widget
circular({double radius = 50.0, Color? color, BoxFit fit = BoxFit.cover}) → Widget

Available on Widget, provided by the CircularWidget extension

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

Available on Widget, provided by the OnTapGesture extension

positioned({double? top, double? left, double? right, double? bottom, double? width, double? height}) → Widget

Available on Widget, provided by the WidgetStackExtensions extension

Places the widget inside a Stack using Positioned If any values are null, it behaves as partially positioned.
positionedFill() → Widget

Available on Widget, provided by the WidgetStackExtensions extension

Wraps the widget in a Positioned.fill
positionedFromRect(Rect rect) → Widget

Available on Widget, provided by the WidgetStackExtensions extension

Wraps in a Positioned.fromRect (helper for Rect positioning)
rounded({double borderRadius = 16.0, Color? color, BoxFit fit = BoxFit.cover}) → Widget

Available on Widget, provided by the RoundedWidget extension

scrollable({Axis scrollDirection = Axis.vertical, bool reverse = false, EdgeInsetsGeometry? padding, bool primary = false, ScrollPhysics? physics, ScrollController? controller, Clip clipBehavior = Clip.hardEdge, String? restorationId, Key? key}) → Widget

Available on Widget, provided by the ScrollableWidget extension

sizedBox({double? width, double? height}) → Widget

Available on Widget, provided by the SizedBoxWidget extension

stackedWith(List<Widget> children, {AlignmentGeometry alignment = Alignment.topLeft, StackFit fit = StackFit.loose, Clip clipBehavior = Clip.hardEdge}) → Widget

Available on Widget, provided by the WidgetStackExtensions extension

Wraps the widget in a Stack with other children
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
visible(bool visible) → Widget

Available on Widget, provided by the VisibilityWidget extension

withAnimatedOpacity({required double opacity, required Duration duration, required Curve curve}) → Widget

Available on Widget, provided by the AnimatedOpacityWidget extension

withBorderRadius(BorderRadius borderRadius) → Widget

Available on Widget, provided by the BorderRadiusWidget extension

withBoxShadow({Color color = Colors.black, double offsetX = 0.0, double offsetY = 2.0, double blurRadius = 6.0}) → Widget

Available on Widget, provided by the ShadowWidget extension

withDecoration(BoxDecoration decoration) → Widget

Available on Widget, provided by the DecorationWidget extension

withMargin(EdgeInsetsGeometry margin) → Widget

Available on Widget, provided by the MarginWidget extension

withPadding(EdgeInsetsGeometry padding) → Widget

Available on Widget, provided by the PaddingWidget extension

withShape(ShapeBorder shape) → Widget

Available on Widget, provided by the ShapeWidget extension

withTooltip(String message) → Widget

Available on Widget, provided by the TooltipWidget extension

Operators

operator ==(Object other) → bool
The equality operator.
inherited