VeryGoodOpenSource / VeryGoodOpenSource/formz
Docs: more complex examples/use cases in combination with bloc
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 487
- Forks
- 42
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 2
Description
Is your feature request related to a problem? Please describe.
I have a use case of a more complex form, but am not sure how to handle it:
For example, let's say I want to have a form where I can enter the data for a Person (which has a name and age). The name and age are simple FormzInputs. For the simple case where we have just 1 person, we can store the 2 fields inside a Bloc's state, and that's fine.
But now, it should be possible to dynamically add an arbitrary number of entries of Persons to the form (e.g. via a "+" button). How could that be handled? Of course, every single block should be validated. In the end, the information of the complete form should be retrieved.
Describe the solution you'd like
I would like to see a bit more complex examples either in the docs or as an example app (which could be referenced in the docs).
Describe alternatives you've considered
I have tried to look for popular projects that use formz in combination with bloc, but couldn't find any.
Additional context
The UI to better imagine the use case:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named in the issue. Start by locating the existing documentation and example apps, then review how form validation is currently demonstrated with bloc; done means adding a clear complex-form example covering dynamically added Person entries, validation, and retrieving the complete form data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100