- chore: tighten dependencies (#127) - Note: This now requires Dart 3.5.0 or higher.
- feat!: update Dart version constraints to "^3.0.0" (#115)
- fix(example): update validation to throw on empty values (#100)
- chore: update very good analysis to 5.1.0 (#104)
- fix(docs): wrong docs (#106)
- feat: add FormzInputErrorCacheMixin mixin
- feat: add isInProgressOrSuccess to FormzSubmissionStatusX
- feat: add purity check to FormzMixin
- docs: add 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
-
docs: use nullable validator in
README
-
feat: add example Flutter app
-
BREAKING: decouple purity, validity, and submission status
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.isEmpty ? NameInputError.empty : null; } } 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
- feat: add
submissionCanceled
toFormzStatus
- BREAKING: opt into null safety
- feat!: upgrade Dart SDK constraints to
>=2.12.0-0 <3.0.0
- BREAKING: opt into null safety
- feat!: upgrade Dart SDK constraints to
>=2.12.0-0 <3.0.0
- chore: fix code formatting
- ci: update to Dart 2.10.0
- Allow value to be
null
inFormzInput
- Add
FormzMixin
- Fix
Formz.validate
to takepure
into consideration - Lint improvements
- Remove redundant extensions on
FormzInputStatus
- Add
isValidated
extension onFormzStatus
- Add
invalid
getter toFormzInput
- Add extensions on
FormzStatus
- Add extensions on
FormzInputStatus
Initial Release of the formz.