SoftSaaSTextInput class

Text input component with production-ready flat styling

The default constructor provides a dense, border-first field matching the production DialogTextField pattern:

  • radius 7
  • compact padding (10h × 12v)
  • no shadow
  • focus via border color shift + width change

Use SoftSaaSTextInput.elevated for the older neumorphic shadow style.

Example:

SoftSaaSTextInput(
  label: 'Email',
  hintText: 'Enter your email',
  onChanged: (value) => print(value),
)
Inheritance

Constructors

SoftSaaSTextInput({Key? key, String? label, String? hintText, String? helperText, String? errorText, TextEditingController? controller, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, bool obscureText = false, bool enabled = true, int? maxLines = 1, TextInputType? keyboardType, IconData? prefixIcon, IconData? suffixIcon, Widget? suffix, BoxConstraints? suffixIconConstraints, bool autofocus = false, bool readOnly = false, VoidCallback? onTap, SoftSaaSTextInputSize size = SoftSaaSTextInputSize.medium})
const
SoftSaaSTextInput.elevated({Key? key, String? label, String? hintText, String? helperText, String? errorText, TextEditingController? controller, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, bool obscureText = false, bool enabled = true, int? maxLines = 1, TextInputType? keyboardType, IconData? prefixIcon, IconData? suffixIcon, Widget? suffix, BoxConstraints? suffixIconConstraints, bool autofocus = false, bool readOnly = false, VoidCallback? onTap, SoftSaaSTextInputSize size = SoftSaaSTextInputSize.medium})
Neumorphic variant with shadow elevation and animated focus state.
const

Properties

autofocus bool
Whether to autofocus this input
final
controller TextEditingController?
Text controller
final
enabled bool
Whether input is enabled
final
errorText String?
Error text displayed below input (overrides helperText)
final
hashCode int
The hash code for this object.
no setterinherited
helperText String?
Helper text displayed below input
final
hintText String?
Placeholder text
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType TextInputType?
Keyboard type
final
label String?
Label displayed above input
final
maxLines int?
Maximum number of lines (1 for single-line, null for unlimited)
final
obscureText bool
Whether to obscure text (for passwords)
final
onChanged ValueChanged<String>?
Called when text changes
final
onSubmitted ValueChanged<String>?
Called when user submits
final
onTap VoidCallback?
Called when the text field is tapped (useful for read-only fields)
final
prefixIcon IconData?
Icon displayed at start of input
final
readOnly bool
Whether the text field is read-only
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size SoftSaaSTextInputSize
Input size variant.
final
suffix Widget?
Arbitrary widget displayed at end of input (takes precedence over suffixIcon)
final
suffixIcon IconData?
Icon displayed at end of input
final
suffixIconConstraints BoxConstraints?
Constraints for the suffix icon area
final

Methods

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