RistoTextField.email constructor

RistoTextField.email({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? title,
  4. String? hint,
  5. String? validator(
    1. String?
    )?,
  6. void onChanged(
    1. String
    )?,
  7. void onSubmitted(
    1. String
    )?,
  8. FocusNode? focusNode,
  9. EdgeInsetsGeometry? margin,
  10. double borderRadius = 12.0,
  11. bool horizontalLayout = false,
  12. Color? fillColor,
  13. Color? borderColor,
  14. Color? focusedBorderColor,
  15. EdgeInsetsGeometry? contentPadding,
  16. double? fieldHeight,
})

Implementation

factory RistoTextField.email({
  Key? key,
  TextEditingController? controller,
  String? title,
  String? hint,
  String? Function(String?)? validator,
  void Function(String)? onChanged,
  void Function(String)? onSubmitted,
  FocusNode? focusNode,
  EdgeInsetsGeometry? margin,
  double borderRadius = 12.0,
  bool horizontalLayout = false,
  Color? fillColor,
  Color? borderColor,
  Color? focusedBorderColor,
  EdgeInsetsGeometry? contentPadding,
  double? fieldHeight,
}) {
  return RistoTextField(
    key: key,
    controller: controller,
    title: title ?? 'Email',
    hint: hint ?? 'example@email.com',
    keyboardType: TextInputType.emailAddress,
    innerLeading: const Icon(Icons.email_outlined),
    validator: validator,
    onChanged: onChanged,
    onSubmitted: onSubmitted,
    focusNode: focusNode,
    margin: margin,
    borderRadius: borderRadius,
    horizontalLayout: horizontalLayout,
    fillColor: fillColor,
    borderColor: borderColor,
    focusedBorderColor: focusedBorderColor,
    contentPadding: contentPadding,
    fieldHeight: fieldHeight,
    counterText: '',
  );
}