form_bloc 0.29.0
form_bloc: ^0.29.0 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.
#0.29.0
Breaking changes #
- Updated to
bloc: ^8.0.0 - Improved null safety of form bloc ( Thanks to @SimoneBressan )
- InputFieldBloc will require initial parameter to support more robust null safety
- Improved null safety of form bloc. Specifically, the fieldBlocs field is no longer null
- Aligned the properties of the states of form bloc. Default values used in place of null properties
- Used num.clamp to manage the progress and is checked if the progress is correct 0.0 >= progress <= 1.0
- Now the name field of a field bloc is not null
- Now the items of SelectFieldBlocState and MultiSelectFieldBlocState are not nullable.
- Now the value field in the FieldBlocState must be specified null. It is no longer nullable in TextFieldBlocState, BooleanFieldBlocState, MultiSelectFieldBlocState.
- Validators are now not forced to accept null values
- Converted SingleFieldBloc, ListFieldBloc, GroupFieldBloc to Cubit ( Thanks to @SimoneBressan )
- Added FieldBlocStateBase to have a common state between FieldBloc
0.20.7-alpha #
- Now the items of SelectFieldBlocState and MultiSelectFieldBlocState are not nullable.
- Now the value field in the FieldBlocState must be specified null. It is no longer nullable in TextFieldBlocState, BooleanFieldBlocState, MultiSelectFieldBlocState.
- InputFieldBloc now ask for the initial parameter to support more robust null safety
- Validators are now not forced to accept null values
0.20.6 #
- fix InputFieldBloc ExtraData?
- form bloc isInitial may throw error
- version sync
0.20.5 #
- fix InputFieldBloc ExtraData?
- form bloc isInitial may throw error
0.20.4 #
- rollback to
meta: ^1.3.0
0.20.3 #
- fix AsyncValidators issue #0.20.2
- Update packages
- Add bool on form checking field blocs are initial
- Fixing type error with updated suggestion function
0.20.1 #
- code improvements
0.19.1 #
- Fix add
FormBlocof items inListFieldBloc.
0.18.0 #
Bad version, you should use >=0.19.0 or <= 0.15.0
0.17.0 #
Bad version, you should use >=0.19.0 or <= 0.15.0
0.16.0 #
Bad version, you should use >=0.19.0 or <= 0.15.0
0.15.0 #
Breaking changes #
- Updated to
bloc: ^5.0.1. - Change
Bloc.addErrortoBloc.addFieldError. - Change
FormBlocDelegatetoFormBlocObserver.
0.14.0 #
- Updated to
bloc: ^4.0.0
0.13.1 #
- Fixed pedantic version.
0.13.0 #
- Now the value of all field blocs are updated when call
updateValueandupdateInitialValuewhen theFormBlocStateisFormBlocSubmitting.
0.11.1 #
- Deprecated
isRequiredparameter in all field blocs, in form_bloc^0.12.0will be removed, if you want a field to be required, please use the validatorFieldBlocValidators.required.
0.11.0 #
Breaking changes #
- Add support for forms with steps.
- Use
AddFieldBloc({int step, List<FieldBloc> fieldBlocs}).
- Use
- All
SingleFieldBlocs now haveExtraDatatype. - Changes
FieldBlocListtoListFieldBloc. - Add
GroupFieldBlocas base class for create typed groups of field blocs. - Add
toJsonmethod toFormBlocState. - Remove
FormBlocState.getFieldBlocFromPath. - Add
valueOfmethod toFormBlocState. - Add
fieldBlocOfmethod toFormBlocState. - Remove
onReloadofFormBloc, now when you callFormBloc.reload,onLoadingwill be called. - Add
onValueChangesStreamSubscription toSingleFieldBloc. - Add
FormBlocUpdatingFieldsstate. - Add
isRequiredparameter toFieldBloc, and the error isFieldBlocValidatorsError.required, so the follow validators are removed:FieldBlocValidators.requiredInputFieldBlocFieldBlocValidators.requiredBooleanFieldBlocFieldBlocValidators.requiredTextFieldBlocFieldBlocValidators.requiredSelectFieldBlocFieldBlocValidators.requiredMultiSelectFieldBloc
- Add
FormBlocUpdatingFieldsstate. - Add
progressproperty toFormBlocLoadingandFormBlocDeleting. - Change
Stream<State> onSubmitting()tovoid onSubmitting(). - Change
Stream<State> onLoading()tovoid onLoading(). - Change
Stream<State> onDeleting()tovoid onDeleting(). - Add methods for emit new states:
- emitSuccess
- emitFailure
- emitSubmitting
- emitLoading
- emitLoadFailed
- emitLoaded
- emitSubmissionCancelled
- emitDeleteFailed
- emitDeleteSuccessful
- emitUpdatingFields
0.10.4 #
- Fixed minor bug.
0.10.3 #
- Fixed
hasFailureResponseproperty ofFormBlocLoadFailed,FormBlocFailureandFormBlocDeleteFailed.
0.10.2 #
- Changes
FieldBloc.addError(String error)toFieldBloc.addError(String error, {bool isPermanent = false}). - Documentation Updates.
0.10.1 #
clearmethod ofFieldBlocnow callupdateInitialValueinstead ofupdateValue.- Fixed
clearmethod ofFormBloc. - Documentation Updates.
0.10.0 #
Breaking changes #
- Removed
fieldBlocsgetter ofFormBloc. now you must useaddFieldBlocmethod. - Renamed
onDeletemethod ofFormBloctoonDeleting. - Added
canSubmitAgainparameter totoSuccessmethod ofFormBlocState. - Now
FieldBloccan be dynamically added to aFormBlocwithaddFieldBloc. - Now
FieldBloccan be dynamically removed from aFormBlocwithremoveFieldBloc. - Added
fieldBlocsproperty toFormBlocState. FieldBlocis now implemented by 3 classes:SingleFieldBlocwhich is the Interface of:InputFieldBloc.TextFieldBloc.BooleanFieldBloc.SelectFieldBloc.MultiSelectFieldBloc.
GroupFieldBloc.FieldBlocList.
- Documentation Updates.
0.8.0 #
- Added
isEditingproperty toFormBlocState(#9). - Added
deleteevent toFormBloc(#9). - Added
toDeleteFailedandtoDeleteSuccessfulmethods toFormBlocState(#9). - If the
initialValueofTextFieldBlocisnullis will be an empty String''. - If the
initialValueofBooleanFieldBlocisnullit will befalse. - If the
initialValueofMultiSelectFieldBlocisnullit will be an empty list[].
0.7.0 #
- Updated to
bloc: ^3.0.0
0.6.0 #
- Updated to
bloc: ^1.0.0bloc.state.listen->bloc.listenbloc.currentState->bloc.statedispatch->adddispose->close
- Documentation Updates.
Validators->FieldBlocValidatorsValidatorsError->FieldBlocValidatorsErrors- Removed
isRequiredproperty fromFieldBlocandFieldBlocState.
0.5.2 #
- Documentation Updates.
- Fixed a bug in
isValidproperty offieldBlocState. - Prevented to update
FieldBloc.valueif is the same value and is validated. - Improved
requiredTextFieldBlocvalidator.
0.5.1 #
- Fixed a bug in
MultiSelectFieldBloc.
0.5.0 #
- Dependency and Documentation Updates.
- Added
isValidatingproperty toFieldBlocState. - Added
asyncValidatorsproperty toFieldBloc. - Added
asyncValidatorDebounceTimeproperty toFieldBloc. - Added
addAsyncValidatorsmethod toFieldBloc. - Added
updateAsyncValidatorsmethod toFieldBloc. - Added
addErrormethod toFieldBloc. - Added
subscribeToFieldBlocsmethod toFieldBloc.
0.4.1 #
- Documentation Updates.
0.4.0 #
- Documentation Updates.
- Added Tests.
- Added
autoValidateproperty toFormBloc. - Added
InputFieldBloc<Value>. - Removed
FileFieldBloc, now you can useInputFieldBloc<File>. - Added
MultiSelectFieldBloc<Value>. - Added
errorproperty toFieldBlocState. - Added
canShowErrorproperty toFieldBlocState. - Added
canShowProgressproperty toFieldBlocState. - Added
suggestionsproperty toFieldBlocState. - Added
isRequiredproperty toFieldBlocState. - Changes
TextFieldBloc<Error>toTextFieldBloc. - Added
valueToIntproperty toTextFieldBlocState. - Added
valueToDoubleproperty toTextFieldBlocState. - Added
FormBlocDelegate.
0.3.1 #
- Added
isCancelingproperty toFormBlocSubmitting.
0.3.0 #
- Dependency and Documentation Updates.
- Added
submissionProgressproperty toFormBlocState. - Added
canSubmitproperty toFormBlocState. - Added
FormBlocSubmissionFailedstate toFormBloc. - Added
FormBlocSubmissionCancelledstate toFormBloc. - Added
cancelSubmissionevent toFormBloc. - Added
updateStateevent toFormBloc. - Added
onCancelSubmissionmethod toFormBloc. - Added
FileFieldBloc.
0.2.0 #
- Documentation Updates
0.1.0 #
- Initial Version of the library.