CSRoundedInput class
A rounded input field with a label and optional prefix and suffix icons.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CSRoundedInput
Constructors
- CSRoundedInput({Key? key, required String labelText, FloatingLabelBehavior floatingLabelBehavior = FloatingLabelBehavior.never, TextInputType? keyboardType = TextInputType.text, TextEditingController? controller, dynamic onChanged(String value)?, bool isRequired = true, IconData? prefixIcon, dynamic prefixIconAction()?, IconData? suffixIcon, dynamic suffixIconAction()?, bool enabled = true, bool seePassword = false, String? confirmValue, InputDecoration? decoration, Color? borderColor, String? validator(String?)?, Color? focusBorderColor, Color? enabledBorderColor, Color? disabledBorderColor, Color? labelColor, Color? prefixEnabledColor, Color? prefixDisabledColor, Color? suffixEnabledColor, Color? suffixDisabledColor})
-
Creates a new instance of the CSRoundedInput class.
The
labelText
parameter is required. ThefloatingLabelBehavior
parameter defaults to FloatingLabelBehavior.never. ThekeyboardType
parameter defaults to TextInputType.text. TheisRequired
parameter defaults to true. Theenabled
parameter defaults to true. TheseePassword
parameter defaults to false.const
Properties
- borderColor → Color?
-
The color of the border of the input field.
If not provided, the default color will be used.
final
- confirmValue → String?
-
The value that the input field must match to be valid.
final
- controller → TextEditingController?
-
The controller that will be used to control the input field.
If not provided, the input field will not be controlled.
final
- decoration → InputDecoration?
-
The decoration that will be used to style the input field. If not provided,
the default decoration will be used.
final
- disabledBorderColor → Color?
-
The color of the border of the input field when it is disabled.
If not provided, the default color will be used.
final
- enabled → bool
-
Whether the input field is enabled or not.
final
- enabledBorderColor → Color?
-
The color of the border of the input field when it is enabled.
If not provided, the default color will be used.
final
- floatingLabelBehavior → FloatingLabelBehavior
-
The behavior of the label when the input field is focused.
Defaults to FloatingLabelBehavior.never.
final
- focusBorderColor → Color?
-
The color of the border of the input field when it is focused.
If not provided, the default color will be used.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRequired → bool
-
Whether the input field is required or not.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardType → TextInputType?
-
The type of keyboard that will be displayed when the input field is focused.
Defaults to TextInputType.text.
final
- labelColor → Color?
-
The color of the label of the input field.
If not provided, the default color will be used.
final
- labelText → String
-
The text that will be displayed as the label of the input field.
final
- onChanged → dynamic Function(String value)?
-
The function that will be called when the value of the input field changes.
If not provided, the input field will not be able to change its value.
final
- prefixDisabledColor → Color?
-
The color of the prefix icon when the input field is disabled.
If not provided, the default color will be used.
final
- prefixEnabledColor → Color?
-
The color of the prefix icon when the input field is enabled.
If not provided, the default color will be used.
final
- prefixIcon → IconData?
-
The icon that will be displayed at the beginning of the input field.
If not provided, the input field will not have a prefix icon.
final
- prefixIconAction → dynamic Function()?
-
The function that will be called when the prefix icon is tapped.
If not provided, the prefix icon will not be tappable.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seePassword → bool
-
Whether the input field is a password field or not.
final
- suffixDisabledColor → Color?
-
The color of the suffix icon when the input field is disabled.
If not provided, the default color will be used.
final
- suffixEnabledColor → Color?
-
The color of the suffix icon when the input field is enabled.
If not provided, the default color will be used.
final
- suffixIcon → IconData?
-
The icon that will be displayed at the end of the input field.
final
- suffixIconAction → dynamic Function()?
-
The function that will be called when the suffix icon is tapped.
final
- validator → String? Function(String?)?
-
The function that will be called to validate the input field.
If not provided, the input field will not be validated.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
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.
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