Improvements:
- Former widgets now provide a more descriptive error message when the type of the form is not passed.
For example:
You must pass in the type of your form that this Former widget is consuming, so that the widget can locate and obtain the correct form. Example: FormerTextField<MyForm>( ^^^^^^^^ Pass in the type of your form here. ...other params, ), This assertion is made by: FormerTextField
- Still figuring out pub versioning, to avoid confusion, I decided to do a release candidate release since there will unlikely be any other API breaking changes.
- No changes - bumped to beta for semantics.
New changes:
FormerForm.submit
now allows return values.- Subsequently,
FormerProvider.submit
now accepts a generic type that should match the return value ofFormerForm.submit
. For example, ifFormerForm.submit
returnsFuture<String>
,String
should be used as a type parameter toFormerProvider.submit
.
- Subsequently,
Breaking changes:
FormerProvider.submit
now automatically disables the form during form submission until it gets a response back.FormerProvider.submit
now throws aFormInvalidException
if the form is invalid.
New features:
FormerProvider
now has a getter that verifies and returns whether the form is valid or not.
FormerError
now renders an emptyContainer
if the given field does not have any error.
FormerForm.submit
now requires aBuildContext
parameter. Forms that extendFormerForm
should have theirsubmit
methods updated accordingly.
- Initial dev release