BaseFieldInput constructor
const
BaseFieldInput({
- Key? key,
- String? label,
- String? initialValue = '',
- double fontSize = 18,
- TextAlign textAlign = TextAlign.start,
- FontWeight fontWeight = FontWeight.bold,
- EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12),
- String placeholder = 'Type a text',
- double? placeholderFontSize = 18,
- MainAxisAlignment placeholderTextAlign = MainAxisAlignment.start,
- FontWeight placeholderFontWeight = FontWeight.bold,
- EdgeInsets placeholderPadding = EdgeInsets.zero,
- double? width,
- double height = 40,
- Border? border,
- BorderRadiusGeometry? borderRadius,
- Color? background,
- Widget leading = const SizedBox(),
- Widget trailing = const SizedBox(),
- bool? isError,
- bool obscureText = false,
- TextInputType? keyboardType,
- Iterable<
String> ? autofillHints, - TextEditingController? controller,
- String? validator()?,
- void onChanged()?,
Implementation
const BaseFieldInput({
super.key,
// label
this.label,
// value
this.initialValue = '',
this.fontSize = 18,
this.textAlign = TextAlign.start,
this.fontWeight = FontWeight.bold,
this.padding = const EdgeInsets.symmetric(
horizontal: 12,
),
// placeholder
this.placeholder = 'Type a text',
this.placeholderFontSize = 18,
this.placeholderTextAlign = MainAxisAlignment.start,
this.placeholderFontWeight = FontWeight.bold,
this.placeholderPadding = EdgeInsets.zero,
// appearance
this.width,
this.height = 40,
this.border,
this.borderRadius,
this.background,
this.leading = const SizedBox(),
this.trailing = const SizedBox(),
this.isError,
// behaviour
this.obscureText = false,
this.keyboardType,
this.autofillHints,
this.controller,
this.validator,
this.onChanged,
});