flutter_flunt 0.1.0+1 copy "flutter_flunt: ^0.1.0+1" to clipboard
flutter_flunt: ^0.1.0+1 copied to clipboard

Library that provides widgets to make it easier to use Flunt-dart in the flutter.

FlutterFlunt #

Build Status codecov

Library that provides widgets to make it easier to use Flunt-dart in the flutter. See Flunt-dart to use this package.

Usage #

Create a contract #

Create a contract for use in FluntTextFormField.

class NameContract extends Contract<String> {
  NameContract(String value, String name) : super(value, name) {
      isNotEmpty("not should be empty");
      hasMaxLen(40, "should have no more than 40 chars");
      hasMinLen(3, "should have at least 3 chars");
  }
}

Use with FluntTextFormField #

FluntTextFormField extends TextFormField and provides a simple way to use contracts.

  FluntTextFormField(
    contract: (value) => StringContract(value, "Name"),
    decoration: InputDecoration(
    prefixIcon: Icon(Icons.account_circle),
    )
)
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Library that provides widgets to make it easier to use Flunt-dart in the flutter.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flunt_dart, flutter

More

Packages that depend on flutter_flunt