bloc_form_plus 0.1.2 copy "bloc_form_plus: ^0.1.2" to clipboard
bloc_form_plus: ^0.1.2 copied to clipboard

Easy Form State Management using BLoC pattern. Separate the Form State and Business Logic from the User Interface. Async Validation, Progress, Dynamic fields, and more.

example/main.dart

import 'package:bloc_form_plus/bloc_form.dart';

class LoginFormBloc extends FormBloc<String, String> {
  final email = TextFieldBloc<dynamic>(
    validators: [
      FieldBlocValidators.required,
      FieldBlocValidators.email,
    ],
  );

  final password = TextFieldBloc<dynamic>(
    validators: [
      FieldBlocValidators.required,
    ],
  );

  LoginFormBloc() {
    addFieldBlocs(
      fieldBlocs: [
        email,
        password,
      ],
    );
  }

  @override
  void onSubmitting() {
    print(email.value);
    print(password.value);
  }
}
0
likes
0
points
92
downloads

Publisher

verified publisherdukanitech.com

Weekly Downloads

Easy Form State Management using BLoC pattern. Separate the Form State and Business Logic from the User Interface. Async Validation, Progress, Dynamic fields, and more.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

bloc, collection, equatable, meta, rxdart, uuid

More

Packages that depend on bloc_form_plus