MultiSelectFieldBloc<Value, ExtraData>  constructor 
      
      MultiSelectFieldBloc<Value, ExtraData> ({ 
    
- String? name,
- List<Value> initialValue = const [],
- List<Validator< ? validators,List< >Value> >
- List<AsyncValidator< ? asyncValidators,List< >Value> >
- Duration asyncValidatorDebounceTime = const Duration(milliseconds: 500),
- Suggestions<Value> ? suggestions,
- List<Value> items = const [],
- dynamic toJson(- List<Value> value
 
- List<
- ExtraData? extraData,
MultiSelectFieldBloc<Value, ExtraData>
Properties:
- name: It is the string that identifies the fieldBloc, it is available in FieldBlocState.name.
- initialValue: The initial value of the field, by default is a empty list- []. And if the value is- nullit will be a empty list- [].
- validators: List of Validators. Each time the- valuewill change, if the FormBloc that use this MultiSelectFieldBloc has set in the- superconstructor- autoValidate = true, the- valueis passed to each- validator, and if any- validatorreturns a- String error, it will be added to MultiSelectFieldBlocState.error. Else if- autoValidate = false, the value will be checked only when you call validate which is called automatically when call FormBloc.submit.
- asyncValidators: List of AsyncValidators. it is the same as- validatorsbut asynchronous. Very useful for server validation.
- asyncValidatorDebounceTime: The debounce time when any- asyncValidatormust be called, by default is 500 milliseconds. Very useful for reduce the number of invocations of each `asyncValidator. For example, used for prevent limit in API calls.
- suggestions: This need be a Suggestions and will be added to MultiSelectFieldBlocState.suggestions. It is used to suggest values, usually from an API, and any of those suggestions can be used to update the value using updateValue.
- items: The list of items that can be selected to update the value.
- toJsonTransform value in a JSON value. By default returns value. This method is called when you use FormBlocState.toJson…
- extraData: It is an object that you can use to add extra data, it will be available in the state FieldBlocState.extraData.
Implementation
MultiSelectFieldBloc({
  String? name,
  List<Value> initialValue = const [],
  super.validators,
  super.asyncValidators,
  super.asyncValidatorDebounceTime = const Duration(milliseconds: 500),
  Suggestions<Value>? suggestions,
  List<Value> items = const [],
  dynamic Function(List<Value> value)? toJson,
  ExtraData? extraData,
}) : super(
        equality: const ListEquality<Never>(),
        initialState: MultiSelectFieldBlocState(
          isValueChanged: false,
          initialValue: initialValue,
          updatedValue: initialValue,
          value: initialValue,
          error: FieldBlocUtils.getInitialStateError(
            validators: validators,
            value: initialValue,
          ),
          isDirty: false,
          suggestions: suggestions,
          isValidated: FieldBlocUtils.getInitialIsValidated(
            FieldBlocUtils.getInitialStateIsValidating(
              asyncValidators: asyncValidators,
              validators: validators,
              value: initialValue,
            ),
          ),
          isValidating: FieldBlocUtils.getInitialStateIsValidating(
            asyncValidators: asyncValidators,
            validators: validators,
            value: initialValue,
          ),
          name: FieldBlocUtils.generateName(name),
          items: SingleFieldBloc._itemsWithoutDuplicates(items),
          toJson: toJson,
          extraData: extraData,
        ),
      );