Last active
November 2, 2020 07:59
-
-
Save zs-dima/f9723b7a5c4dfccb65692cb06c67be02 to your computer and use it in GitHub Desktop.
SomeForm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeForm extends FormData<SomeObj> { | |
FormField<Duration> field1; | |
FormField<int> field2; | |
* * * | |
DocketForm({@required SomeObj obj}) : super(data: obj) { | |
contact = add( | |
data.field1, | |
onSaved: (v) => data.copyWith(field1: v), | |
validator: (v) => v.isNullOrSpace ? 'Invalid field1 value' : null, | |
); | |
* * * | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment