ElevarmTextInputField constructor

const ElevarmTextInputField({
  1. Key? key,
  2. String? label,
  3. String? errorText,
  4. String? hintText,
  5. bool enabled = true,
  6. String? helperText,
  7. ElevarmTextInputFieldSize size = ElevarmTextInputFieldSize.md,
  8. IconData? prefixIconAssetName,
  9. String? prefixText,
  10. String? prefixAddOnText,
  11. bool prefixUseMastercard = false,
  12. String? suffixAddOnText,
  13. IconData? suffixIconAssetName,
  14. TextEditingController? controller,
  15. String? initialValue,
  16. TextInputType? keyboardType,
  17. TextInputAction? textInputAction,
  18. bool? showCursor,
  19. SmartDashesType? smartDashesType,
  20. SmartQuotesType? smartQuotesType,
  21. MaxLengthEnforcement? maxLengthEnforcement,
  22. int? minLines,
  23. int? maxLength,
  24. void onChanged(
    1. String
    )?,
  25. void onTap()?,
  26. void onEditingComplete()?,
  27. void onFieldSubmitted(
    1. String
    )?,
  28. void onSaved(
    1. String?
    )?,
  29. String? validator(
    1. String?
    )?,
  30. List<TextInputFormatter>? inputFormatters,
  31. double? cursorHeight,
  32. Radius? cursorRadius,
  33. Brightness? keyboardAppearance,
  34. bool? enableInteractiveSelection,
  35. TextSelectionControls? selectionControls,
  36. Widget? buildCounter(
    1. BuildContext, {
    2. required int currentLength,
    3. required bool isFocused,
    4. required int? maxLength,
    })?,
  37. ScrollPhysics? scrollPhysics,
  38. Iterable<String>? autofillHints,
  39. AutovalidateMode? autovalidateMode,
  40. ScrollController? scrollController,
  41. String? restorationId,
  42. MouseCursor? mouseCursor,
  43. bool enableIMEPersonalizedLearning = true,
  44. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  45. double cursorWidth = 2.0,
  46. int? maxLines = 1,
  47. String obscuringCharacter = '•',
  48. bool enableSuggestions = true,
  49. bool expands = false,
  50. bool obscureText = false,
  51. bool autocorrect = true,
  52. bool autofocus = false,
  53. bool readOnly = false,
  54. TextCapitalization textCapitalization = TextCapitalization.none,
  55. IconData? suffixErrorIconAssetName = ElevarmIconsOutline.alert_circle,
  56. VoidCallback? onTapSuffix,
  57. FocusNode? focusNode,
  58. bool isRequired = false,
})

Implementation

const ElevarmTextInputField({
  super.key,
  this.label,
  this.errorText,
  this.hintText,
  this.enabled = true,
  this.helperText,
  this.size = ElevarmTextInputFieldSize.md,
  this.prefixIconAssetName,
  this.prefixText,
  this.prefixAddOnText,
  this.prefixUseMastercard = false,
  this.suffixAddOnText,
  this.suffixIconAssetName,
  this.controller,
  this.initialValue,
  this.keyboardType,
  this.textInputAction,
  this.showCursor,
  this.smartDashesType,
  this.smartQuotesType,
  this.maxLengthEnforcement,
  this.minLines,
  this.maxLength,
  this.onChanged,
  this.onTap,
  this.onEditingComplete,
  this.onFieldSubmitted,
  this.onSaved,
  this.validator,
  this.inputFormatters,
  this.cursorHeight,
  this.cursorRadius,
  this.keyboardAppearance,
  this.enableInteractiveSelection,
  this.selectionControls,
  this.buildCounter,
  this.scrollPhysics,
  this.autofillHints,
  this.autovalidateMode,
  this.scrollController,
  this.restorationId,
  this.mouseCursor,
  this.enableIMEPersonalizedLearning = true,
  this.scrollPadding = const EdgeInsets.all(20.0),
  this.cursorWidth = 2.0,
  this.maxLines = 1,
  this.obscuringCharacter = '•',
  this.enableSuggestions = true,
  this.expands = false,
  this.obscureText = false,
  this.autocorrect = true,
  this.autofocus = false,
  this.readOnly = false,
  this.textCapitalization = TextCapitalization.none,
  this.suffixErrorIconAssetName = ElevarmIconsOutline.alert_circle,
  this.onTapSuffix,
  this.focusNode,
  this.isRequired = false,
});