MDSInput class

Inheritance

Constructors

MDSInput({Key? key, required BuildContext? parentContext, required TextEditingController? textEditingController, required GlobalKey<FormFieldState>? textFormFieldKey, FormFieldValidator<String>? validator, TextInputType? textInputType, Function? textFieldFocusCallback, Function? textFieldUnFocusCallback, Function? textFieldOnTap, TextInputAction? textInputAction = TextInputAction.done, IconData? suffixIcon, IconData? prefixIcon, String? placeholderText, Function? prefixIconCallback, Function? suffixIconCallback, TextCapitalization? textCapitalization = TextCapitalization.none, TextAlign? textAlignment = TextAlign.left, int? minLines = 1, int? maxLines = 1, bool? isMultiLine = false, bool? isObscureText = false, bool? isReadOnly = false, bool? isInitialFocus = false, int? numberOfCharactersAllowed, bool? isUSPhoneNumber = true, bool? isInteractiveSelectionEnabled = true, Widget? suffixIconWidget, dynamic onFieldSubmitted(String)?, FormFieldSetter<String>? onSaved, dynamic textFieldDidUpdate(String)?, Color? backgroundColor, bool? isClearButtonEnabled = false, List<TextInputFormatter>? inputFormatters, FocusNode? textFieldFocusNode, String? labelText, String? helperText, String? prefixText, String? suffixText, bool? isCompulsory = false, bool? isMetric = false, bool? isVerificationCode = false, int? verificationCodeLength = 4, bool? isVerificationCodeNumberOnly = true})
const

Properties

backgroundColor Color?
background color of the textFormField
final
hashCode int
The hash code for this object.
no setterinherited
helperText String?
helperText is shown below the textField
final
inputFormatters List<TextInputFormatter>?
the list of input formatters
final
isClearButtonEnabled bool?
to show a suffix icon which will clear the textFormField when pressed
final
isCompulsory bool?
to show red dot on right side of label text
final
isInitialFocus bool?
use isInitialFocus to give focus initially without clicking on MDSInput
final
isInteractiveSelectionEnabled bool?
for enabling/disabling interactive selection
final
isMetric bool?
this will act as increment/decrement field
final
isMultiLine bool?
isMultiLine will indicate whether the textFormField will contain multiple lines input or not
final
isObscureText bool?
if user want to hide text like in password then user isObscureText
final
isReadOnly bool?
isReadOnly depicts whether text can be changed.
final
isUSPhoneNumber bool?
pass isUSPhoneNumber true when user wants to enter phone number in US format else default is false
final
isVerificationCode bool?
final
isVerificationCodeNumberOnly bool?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelText String?
labelText is shown above the textField
final
maxLines int?
maxLines used to give maximum no lines that will display in MDSInput, it will expand the height of MDSInput
final
minLines int?
minLines will control the minimum number of lines in MDSInput remember minLines can't be greater than maxLines
final
numberOfCharactersAllowed int?
maximum no of characters allowed is controlled by numberOfCharactersAllowed
final
onFieldSubmitted → (dynamic Function(String)?)
onFieldSubmitted will be called when the textFormField is submitted
final
onSaved FormFieldSetter<String>?
onSaved will be called when the textFormField is saved
final
parentContext BuildContext?
parentContext needs to show/hide overlay done button in parent screen for iOS when textInputType is number
final
placeholderText String?
placeholderText will be displayed initially inside MDSInput to give a hint of the kind of input to be entered
final
prefixIcon IconData?
prefixIcon will be placed at most left side of MDSInput
final
prefixIconCallback Function?
prefixIconCallback is called when prefixIcon is pressed
final
prefixText String?
prefixText is shown at starting-left of the textField
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffixIcon IconData?
suffixIcon will be placed at most right side of MDSInput
final
suffixIconCallback Function?
suffixIconCallback is called when suffixIcon is pressed
final
suffixIconWidget Widget?
suffixIconWidget will be used to show custom widgets in place of suffix icon
final
suffixText String?
suffixText is shown at ending-right of the textField
final
textAlignment TextAlign?
textAlignment used to align text in MDSInput
final
textCapitalization TextCapitalization?
textCapitalization configures how the platform keyboard will select an uppercase or lowercase keyboard
final
textEditingController TextEditingController?
to retrieve the text from ITextFormField textEditingController is used
final
textFieldDidUpdate → (dynamic Function(String)?)
textFieldDidUpdate will be called when value in textFormField changes
final
textFieldFocusCallback Function?
textFieldFocusCallback called when MDSInput comes in focus
final
textFieldFocusNode FocusNode?
textFieldFocusNode will be used for handling focus changes in MDSInput remember to dispose when you pass it
final
textFieldOnTap Function?
textFieldOnTap callback is called when MDSInput is tapped
final
textFieldUnFocusCallback Function?
textFieldUnFocusCallback called when MDSInput focus is removed
final
textFormFieldKey GlobalKey<FormFieldState>?
to get current state of MDSInput, textFormFieldKey is used make sure that when there is validation then pass textFormFieldKey in MDSInput
final
textInputAction TextInputAction?
textInputAction will define an action the user has requested the text input control to perform. It also configures the keyboard to display a certain kind of action button
final
textInputType TextInputType?
textInputType take the input as text, number...etc
final
validator FormFieldValidator<String>?
validator function used to validate the text input If the user enters valid text, the MDSInput appears normally without any warnings to the user make sure to pass textFormFieldKey to validate MDSInput
final
verificationCodeLength int?
final

Methods

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