ZeroTextField.outline constructor
ZeroTextField.outline({
- Key? key,
- String? hintText,
- String? labelText,
- ZeroTextfieldSize? textfielSizeType,
- TextEditingController? controller,
- FocusNode? focusNode,
- TextInputType? inputType,
- dynamic onChanged()?,
- dynamic onEditingComplete()?,
- String? validator()?,
- Widget? prefixIcon,
- Widget? suffixIcon,
- Widget? prefix,
- Widget? suffix,
- AutovalidateMode? autovalidateMode,
- InputDecoration? decoration,
- String? helperText,
- String? errorText,
- bool? enabled,
- bool? autofocus,
- void onFieldSubmitted(
- String text
- void onSaved(
- String? text
- void onTap()?,
- void onTapOutside(
- PointerDownEvent event
- OnFocusChanged? onFocusChanged,
- bool? autocorrect,
- Iterable<
String> ? autofillHints, - BuildCounter? buildCounter,
- ContextMenuBuilder? contextMenuBuilder,
- Color? cursorColor,
- double? cursorHeight,
- Radius? cursorRadius,
- double? cursorWidth,
- bool? enableIMEPersonalizedLearning,
- bool? enableInteractiveSelection,
- bool? enableSuggestion,
- TextStyle? errorStyle,
- TextStyle? helperStyle,
- TextStyle? labelStyle,
- int? maxLength,
- bool? expands,
- String? initialValue,
- List<
TextInputFormatter> ? inputFormatters, - Brightness? keyboardAppearance,
- MaxLengthEnforcement? maxLengthEnforcement,
- int? maxLines,
- int? minLines,
- MouseCursor? mouseCursor,
- bool? obscureText,
- String? obscuringCharacter,
- bool? readOnly,
- ScrollController? scrollController,
- EdgeInsets? scrollPadding,
- ScrollPhysics? scrollPhysics,
- TextSelectionControls? selectionControls,
- bool? showCursor,
- StrutStyle? strutStyle,
- TextStyle? style,
- TextAlign? textAlign,
- TextAlignVertical? textAlignVertical,
- TextCapitalization? textCapitalization,
- TextDirection? textDirection,
- TextInputAction? textInputAction,
This already uses OutlineInputBorder under the hood with the properties defined in the standard ZeroOne design guideline.
Implementation
factory ZeroTextField.outline({
Key? key,
String? hintText,
String? labelText,
ZeroTextfieldSize? textfielSizeType,
TextEditingController? controller,
FocusNode? focusNode,
TextInputType? inputType,
Function(String)? onChanged,
Function()? onEditingComplete,
String? Function(String?)? validator,
Widget? prefixIcon,
Widget? suffixIcon,
Widget? prefix,
Widget? suffix,
AutovalidateMode? autovalidateMode,
InputDecoration? decoration,
String? helperText,
String? errorText,
bool? enabled,
bool? autofocus,
void Function(String text)? onFieldSubmitted,
void Function(String? text)? onSaved,
void Function()? onTap,
void Function(PointerDownEvent event)? onTapOutside,
OnFocusChanged? onFocusChanged,
bool? autocorrect,
Iterable<String>? autofillHints,
BuildCounter? buildCounter,
ContextMenuBuilder? contextMenuBuilder,
Color? cursorColor,
double? cursorHeight,
Radius? cursorRadius,
double? cursorWidth,
bool? enableIMEPersonalizedLearning,
bool? enableInteractiveSelection,
bool? enableSuggestion,
TextStyle? errorStyle,
TextStyle? helperStyle,
TextStyle? labelStyle,
int? maxLength,
bool? expands,
String? initialValue,
List<TextInputFormatter>? inputFormatters,
Brightness? keyboardAppearance,
MaxLengthEnforcement? maxLengthEnforcement,
int? maxLines,
int? minLines,
MouseCursor? mouseCursor,
bool? obscureText,
String? obscuringCharacter,
bool? readOnly,
ScrollController? scrollController,
EdgeInsets? scrollPadding,
ScrollPhysics? scrollPhysics,
TextSelectionControls? selectionControls,
bool? showCursor,
StrutStyle? strutStyle,
TextStyle? style,
TextAlign? textAlign,
TextAlignVertical? textAlignVertical,
TextCapitalization? textCapitalization,
TextDirection? textDirection,
TextInputAction? textInputAction,
}) =>
ZeroTextField(
key: key,
labelText: labelText,
hintText: hintText,
controller: controller,
focusNode: focusNode,
keyboardType: inputType,
onChanged: onChanged,
onEditingComplete: onEditingComplete,
validator: validator,
textfieldSize: textfielSizeType ?? ZeroTextfieldSize.small,
autovalidateMode: autovalidateMode,
inputDecorationType: InputDecorationType.outline,
prefixIcon: prefixIcon,
suffixIcon: suffixIcon,
prefix: prefix,
suffix: suffix,
decoration: decoration,
helperText: helperText,
errorText: errorText,
enabled: enabled,
autofocus: autofocus,
onFieldSubmitted: onFieldSubmitted,
onSaved: onSaved,
onTap: onTap,
onTapOutside: onTapOutside,
onFocusChanged: onFocusChanged,
autocorrect: autocorrect ?? false,
autofillHints: autofillHints,
buildCounter: buildCounter,
contextMenuBuilder: contextMenuBuilder,
cursorColor: cursorColor,
cursorHeight: cursorHeight,
cursorRadius: cursorRadius,
cursorWidth: cursorWidth ?? 2.0,
enableIMEPersonalizedLearning: enableIMEPersonalizedLearning ?? true,
enableInteractiveSelection: enableInteractiveSelection,
enableSuggestion: enableSuggestion ?? false,
errorStyle: errorStyle,
expands: expands ?? false,
helperStyle: helperStyle,
initialValue: initialValue,
inputFormatters: inputFormatters,
keyboardAppearance: keyboardAppearance,
labelStyle: labelStyle,
maxLength: maxLength,
maxLengthEnforcement: maxLengthEnforcement,
maxLines: maxLines,
minLines: minLines,
mouseCursor: mouseCursor,
obscureText: obscureText ?? false,
obscuringCharacter: obscuringCharacter ?? '•',
readOnly: readOnly ?? false,
scrollController: scrollController,
scrollPadding: scrollPadding ?? const EdgeInsets.all(20.0),
scrollPhysics: scrollPhysics,
selectionControls: selectionControls,
showCursor: showCursor ?? true,
strutStyle: strutStyle,
style: style,
textAlign: textAlign ?? TextAlign.start,
textAlignVertical: textAlignVertical,
textCapitalization: textCapitalization ?? TextCapitalization.none,
textDirection: textDirection,
textInputAction: textInputAction,
);