custom_error_text_form_field 0.0.1 copy "custom_error_text_form_field: ^0.0.1" to clipboard
custom_error_text_form_field: ^0.0.1 copied to clipboard

A TextFormField widget that lets you show the error message as an overlay.

A TextFormField widget that lets you show the error message as an overlay.

Features #

This package provides a CustomErrorTextFormField widget, which will show the error message (when the form field is invalid) as an overlay placed relative to the form field, instead of the default behavior of the TextFormField which is to show the error message below the form field and modifies the layout.

Usage #

The CustomErrorTextFormField has all the same parameters as TextFormField except for the four extra parameters:

  final Widget Function(String) errorTextBuilder;
  final Alignment errorTextAnchor;
  final Alignment textFieldAnchor;
  final Offset errorTextOffset;

errorTextBuilder specifies how the error text widget is defined. The errorTextAnchor and textFieldAnchor, plus errorTextOffset will determine how the error text widget is placed relative to the form field.

Example

1
likes
150
points
18
downloads

Publisher

verified publisherwenkaifan.com

Weekly Downloads

A TextFormField widget that lets you show the error message as an overlay.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on custom_error_text_form_field