GiancarloCode/form_bloc

Help with BooleanFieldBloc and SelectFieldBloc

Closed this issue · 3 comments

// addFieldBloc(
// fieldBloc: BooleanFieldBloc(
// name: 'boolean',
// validators: FieldBlocValidators.requiredBooleanFieldBloc));

and help me to make a dropdownbloc i am new in flutter

Hello @jatin-rajput

validators is a List<Validator>, thanks to this you can add different validators:

  addFieldBloc(
      fieldBloc: BooleanFieldBloc(
        name: 'boolean',
        validators: [
          FieldBlocValidators.requiredBooleanFieldBloc,
          // You can add more validators...
        ],
      ),
    );
  • A DropdownFieldBlocBuilder is widget that need a SelectFieldBloc.
    Checkout this example:
    BLoC - Widget

  • A DropdownFieldBlocBuilder with enum values example:
    Checkout this example:
    BLoC - Widget

yupppp my problem is solved thanks alot... best of luck for future....amazing package

Great.
Remember that in addition to the widgets offered by flutter_form_bloc, it is quite simple to make any widget react to the FieldBloc and update its value, so you will not have any limitation in the visual aspect (UI).