flutter_flunt 0.1.0+1

Flutter Android iOS web

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
90
pub points
0%
popularity

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

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

pedro.bissonho@gmail.com

License

MIT (LICENSE)

Dependencies

flunt_dart, flutter

More

Packages that depend on flutter_flunt