form_bloc 0.20.7-alpha copy "form_bloc: ^0.20.7-alpha" to clipboard
form_bloc: ^0.20.7-alpha copied to clipboard

outdated

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:form_bloc/form_bloc.dart';

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

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

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

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

Publisher

unverified uploader

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, pedantic, rxdart, uuid

More

Packages that depend on form_bloc