NomoInput constructor

const NomoInput({
  1. Key? key,
  2. Color? background,
  3. FocusNode? focusNode,
  4. EdgeInsets? padding,
  5. TextStyle? style,
  6. Widget? leading,
  7. Widget? trailling,
  8. bool autoFocus = false,
  9. String? title,
  10. TextInputType? keyboardType,
  11. List<TextInputFormatter>? inputFormatters,
  12. BorderRadiusGeometry? borderRadius,
  13. String? placeHolder,
  14. TextStyle? titleStyle,
  15. TextStyle? placeHolderStyle,
  16. bool usePlaceholderAsTitle = false,
  17. int? maxLines,
  18. int? minLines,
  19. TextInputAction? textInputAction,
  20. ValueNotifier<String>? valueNotifier,
  21. String? validator(
    1. String value
    )?,
  22. Color? errorColor,
  23. TextStyle? errorStyle,
  24. ValueNotifier<String?>? errorNotifier,
  25. Border? border,
  26. Border? errorBorder,
  27. Border? selectedBorder,
  28. Border? selectedErrorBorder,
  29. EdgeInsets? margin,
  30. Cubic? curve,
  31. Duration? duration,
  32. String? formKey,
  33. bool autoValidate = false,
  34. double? titleSpacing,
  35. double? height,
  36. void onChanged(
    1. String value
    )?,
  37. TextAlign textAlign = TextAlign.start,
  38. void onFocusChanged(
    1. bool hasFocus
    )?,
  39. bool enabled = true,
  40. bool scrollable = false,
  41. String? initialText,
  42. bool? obscureText,
  43. Widget? top,
  44. Widget? bottom,
  45. int? maxLength,
  46. int? maxParagraphs,
  47. void onTap()?,
  48. void onTapOutside(
    1. PointerDownEvent
    )?,
  49. HitTestBehavior hitTestBehavior = HitTestBehavior.translucent,
  50. TextEditingController? textEditingController,
  51. void onFieldSubmitted()?,
})

Implementation

const NomoInput({
  super.key,
  this.background,
  this.focusNode,
  this.padding,
  this.style,
  this.leading,
  this.trailling,
  this.autoFocus = false,
  this.title,
  this.keyboardType,
  this.inputFormatters,
  this.borderRadius,
  this.placeHolder,
  this.titleStyle,
  this.placeHolderStyle,
  this.usePlaceholderAsTitle = false,
  this.maxLines,
  this.minLines,
  this.textInputAction,
  this.valueNotifier,
  this.validator,
  this.errorColor,
  this.errorStyle,
  this.errorNotifier,
  this.border,
  this.errorBorder,
  this.selectedBorder,
  this.selectedErrorBorder,
  this.margin,
  this.curve,
  this.duration,
  this.formKey,
  this.autoValidate = false,
  this.titleSpacing,
  this.height,
  this.onChanged,
  this.textAlign = TextAlign.start,
  this.onFocusChanged,
  this.enabled = true,
  this.scrollable = false,
  this.initialText,
  this.obscureText,
  this.top,
  this.bottom,
  this.maxLength,
  this.maxParagraphs,
  this.onTap,
  this.onTapOutside,
  this.hitTestBehavior = HitTestBehavior.translucent,
  this.textEditingController,
  this.onFieldSubmitted,
})  : assert(
        height == null || usePlaceholderAsTitle == false,
        'Not supported please ask Thomas to implement',
      ),
      assert(
        textEditingController == null || valueNotifier == null,
        'Please provide either a textEditingController or a valueNotifier',
      );