Releases: VeryGoodOpenSource/formz
Releases · VeryGoodOpenSource/formz
v0.8.0
v0.7.0
v0.6.1
v0.6.0
- feat: add FormzInputErrorCacheMixin mixin
- feat: add isInProgressOrSuccess to FormzSubmissionStatusX
- feat: add purity check to FormzMixin
v0.5.0+1
chore: v0.5.0+1 (#80)
v0.5.0
- docs: add a caching example
- refactor: update very good analysis, workflows, flutter/dart version
- feat: update very good analysis
- feat: add dependabot
- BREAKING: this release promotes 0.5.0-dev.1 which brings breaking changes
v0.5.0-dev.1
0.5.0-dev.1
-
docs: use nullable validator in
README
-
feat: add example Flutter app
-
BREAKING: decouple purity, validity, and submission status
Changes
FormzStatus
renamed toFormzSubmissionStatus
:
/// Enum representing the submission status of a form. enum FormzSubmissionStatus { /// The form is in the process of being submitted. inProgress, /// The form has been submitted successfully. success, /// The form submission failed. failure, /// The form submission has been canceled. canceled }
FormzInput
class no longer exposes astatus
(FormzInputStatus
). Instead there areisValid
andisNotValid
getters:
class NameInput extends FormzInput<String, NameInputError> { const NameInput.pure() : super.pure(''); const NameInput.dirty({String value = ''}) : super.dirty(value); @override NameInputError? validator(String value) { return value.isNotEmpty == true ? null : NameInputError.empty; } } void main() { const name = NameInput.pure(); print(name.isValid); // false print(name.isNotValid); // true const joe = NameInput.dirty(value: 'joe'); print(joe.isValid); // true print(joe.isNotValid); // false }
FormzInput
has adisplayError
getter which returns an error to display if the input is not valid and has been modified by the user (closes #44)
void main() { const name = NameInput.pure(); print(name.displayError); // null const invalid = NameInput.dirty(value: ''); print(name.displayError); // NameInputError.empty }
- Renamed
pure
toisPure
for consistency
v0.4.1
v0.4.0
v0.4.0-nullsafety.0
- chore!: migrate to null safety