Comments (6)
Thanks for helping.
I will check and fix
from reactive_forms_generator.
Released new version with generic support
from reactive_forms_generator.
Hi @BenjiFarquhar could you try generics
branch?
It was pretty fast implementation so I will try to add some fixes if needed
from reactive_forms_generator.
@vasilich6107 Thanks!! I ended up realising that the class I was trying to assign to vgnItm
has field tags
of type List<dynamic>
if it is not given a generic, so my error was not actually solvable with a generic form. Apologies! Not to say that generic forms don't have a good use case though!
I tried to pull the generics branch down and run with the tags<T>
form class but I got this error:
[SEVERE] reactive_forms_generator:reactive_forms_generator on lib/src/presentation/pages/manage_vegan_items/factories/form_definitions/_common/tags/tags_form_definition.dart (cached):
Invalid argument(s): [typeParameters.length: 1][typeArguments.length: 0][element: class Tags<T> with _$Tags<T>][typeParameters: [T]][typeArguments: []]
[SEVERE] Failed after 401ms
So it might not be working?
from reactive_forms_generator.
There is a demo in example
https://github.com/artflutter/reactive_forms_generator/blob/generics/packages/reactive_forms_generator/example/lib/docs/generic/generic.dart
Could you provide the code that fails for you?
from reactive_forms_generator.
@vasilich6107 Working great. I added a demo for generic in a PR. Code conflicts on generated files. Are you able to run your gen to fix?
from reactive_forms_generator.
Related Issues (20)
- didUpdateWidget sets the form to pristine and untouched HOT 5
- How to use non-const validators HOT 3
- Freezed: Generated *.gform.dart contains errors (Generated duplicated code) HOT 4
- Calling the generated FormModel's `remove<Model>ItemAtIndex()` appears buggy. HOT 9
- 0.23.2 causing an infinite loop HOT 9
- New FormModel.reset method behaves slightly different to FormGroup equivalent HOT 6
- Cant add validators to freezed classes. HOT 4
- Provider / Riverpod plugin HOT 10
- How to populate the form from some business logic/repository pattern? HOT 3
- [bug] @FormGroupAnnotation validators aren't respected HOT 1
- Shared models are generated twice HOT 4
- support for generics? HOT 6
- generated FormBuilder should call `initState` on `didUpdateWidget` HOT 3
- Generated classes missing the resetValue member HOT 12
- Example of a ReactiveFormsGenerator on ViewModel HOT 4
- The casing of key names of Form value is different from what Freezed package generated HOT 7
- The static formControlNames could be const HOT 2
- Validators set programmatically get cleared on didUpdateWidget HOT 1
- Programmatically Add controls HOT 2
- @FormArrayAnnotation() with inheritance HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactive_forms_generator.