form_bloc
form_bloc copied to clipboard
use built_collection to expose field blocs in form bloc - list field - group - field states.
By using built_collection we can prevent the user from making mutations to the collections of field blocs that use the blocs (form, list, and group), which would cause unexpected behaviors, such as validation errors.
Hi @GiancarloCode where exactly do you plan to be using built_collection is it the abstract class FormBloc? It si also worth taking into account that built collection wont prevent the user to mutate the data of the items in the collection.
@fabiancrx Hello :) For example in https://pub.dev/documentation/form_bloc/latest/form_bloc/ListFieldBlocState/fieldBlocs.html or https://pub.dev/documentation/form_bloc/latest/form_bloc/FormBlocState/fieldBlocs.html This will prevent from trying to change the order, or delete a field bloc "by error"