ReadyPhoneInput class
A customizable phone input widget with country code selector.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ReadyPhoneInput
Constructors
-
ReadyPhoneInput({Key? key, TextEditingController? controller, required dynamic onCountryChange(Country), String? validator(String?)?, String? initialDialCode, String? hintText, String? labelText, TextInputAction textInputAction = TextInputAction.done, bool autoFocus = false, bool isReadOnly = false, ValueChanged<
String> ? onChanged, ValueChanged<String> ? onFieldSubmitted, Widget? buildCounter(BuildContext, {int currentLength, bool isFocused, int? maxLength})?, AutovalidateMode? autovalidateMode, List<TextInputFormatter> ? inputFormatters, CursorStyleData? cursorStyle, InputDecorationType decorationType = InputDecorationType.outlined, bool enableInteractiveSelection = true, bool enableSuggestions = true, bool enabled = true, bool? expands, FocusNode? focusNode, bool? isObscure, VoidCallback? onEditingComplete, VoidCallback? onTap, EdgeInsets? scrollPadding, bool? showLabelInside, TextStyle? style, Widget? suffixIcon, TextAlign? textAlign, TextAlignVertical? textAlignVertical, TextCapitalization? textCapitalization, BorderRadius? borderRadius, List<Country> ? countries}) -
const
Properties
- autoFocus → bool
-
Autofocus flag for the input.
final
- autovalidateMode → AutovalidateMode?
-
Validation mode.
final
- borderRadius → BorderRadius?
-
Border radius for the input.
final
- buildCounter → Widget? Function(BuildContext, {int currentLength, bool isFocused, int? maxLength})?
-
Optional buildCounter widget.
final
- controller → TextEditingController?
-
Text controller for the phone input.
final
-
countries
→ List<
Country> ? -
Optional custom country list.
final
- cursorStyle → CursorStyleData?
-
Custom cursor styling.
final
- decorationType → InputDecorationType
-
Input decoration type.
final
- enabled → bool
-
Enable/disable input.
final
- enableInteractiveSelection → bool
-
Enable selection in input.
final
- enableSuggestions → bool
-
Enable text suggestions.
final
- expands → bool?
-
Expand input vertically.
final
- focusNode → FocusNode?
-
Custom focus node.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintText → String?
-
Hint text for the input.
final
- initialDialCode → String?
-
Initial dial code to be selected.
final
-
inputFormatters
→ List<
TextInputFormatter> ? -
Input formatters.
final
- isObscure → bool?
-
Obscure the input (for passwords, etc).
final
- isReadOnly → bool
-
Make input read-only.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- labelText → String?
-
Label text for the input.
final
-
onChanged
→ ValueChanged<
String> ? -
Called when input value changes.
final
- onCountryChange → dynamic Function(Country)
-
Callback triggered when the country changes.
final
- onEditingComplete → VoidCallback?
-
Callback when editing is completed.
final
-
onFieldSubmitted
→ ValueChanged<
String> ? -
Called when input is submitted.
final
- onTap → VoidCallback?
-
Callback on input tap.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollPadding → EdgeInsets?
-
Padding for scroll insets.
final
- showLabelInside → bool?
-
Show label inside field.
final
- style → TextStyle?
-
Input text style.
final
- suffixIcon → Widget?
-
Custom suffix icon.
final
- textAlign → TextAlign?
-
Text alignment in the input.
final
- textAlignVertical → TextAlignVertical?
-
Vertical text alignment.
final
- textCapitalization → TextCapitalization?
-
Text capitalization rules.
final
- textInputAction → TextInputAction
-
Action button for the keyboard.
final
- validator → String? Function(String?)?
-
Validator function for phone input.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ReadyPhoneInput> -
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