InsetFieldShadow constructor

InsetFieldShadow({
  1. Key? key,
  2. FormFieldValidator<String>? validator,
  3. Widget? label,
  4. int? maxLines,
  5. Widget? suffix,
  6. Widget? prefix,
  7. TextInputType keyboardType = TextInputType.text,
  8. String? hint,
  9. required TextEditingController? controller,
  10. bool obscureText = false,
  11. EdgeInsetsGeometry? margin,
  12. EdgeInsetsGeometry? padding,
  13. dynamic onTap()?,
})

Implementation

InsetFieldShadow({
  super.key,
  super.validator,
  this.label,
  this.maxLines,
  this.suffix,
  this.prefix,
  this.keyboardType = TextInputType.text,
  this.hint,
  required this.controller,
  this.obscureText = false,
  this.margin,
  this.padding,
  this.onTap,
}) : super(
        initialValue: controller?.text,
        builder: (FormFieldState<String> field) {
          return _MyTextField(
            field: field,
            maxLines: maxLines,
            label: label,
            suffix: suffix,
            prefix: prefix,
            keyboardType: keyboardType,
            hint: hint,
            controller: controller,
            obscureText: obscureText,
            margin: margin,
            padding: padding,
            onTap: onTap,
            onChanged: (value) {
              field.didChange(value);
            },
          );
        },
      );