Closed ahmednfwela closed 2 weeks ago
Hi Will check
any news on this ? @vasilich6107
Hi. Sorry for delay. Answered quick issues. You's next)
Hi @ahmednfwela
For now typed annotation combined with Array
of FormGroups
should be considered as known limitation.
Please fallback to untyped annotations.
FormArray of FormGroups value is deeply nested map so it does not seem to be very easy to mimic the typed behaviour
Would it be possible to provide untyped validators to work around this limitation with typing enabled everywhere but validators?
@colunira the default type is dynamic just omit type in annotation
Hi @ahmednfwela! Your issue has been closed. If we were helpful don't forget to star the repo.
Please check our reactive_forms_widget package
We would appreciate sponsorship subscription or one time donation https://github.com/sponsors/artflutter
when generating a model with
@FormArrayAnnotation<TModel>
(not just@FormArrayAnnotation()
) the validators assume it's aFormArray<TModel>
, but the generated code is alwaysFormArray<Map<String, Object?>>
e.g.: if this was
@FormArrayAnnotation<UrlEntity>(validators: [someValidator])
https://github.com/artflutter/reactive_forms_generator/blob/master/packages/reactive_forms_generator/example/lib/docs/animated_url_list/url.dart#L10then this would fail https://github.com/artflutter/reactive_forms_generator/blob/master/packages/reactive_forms_generator/example/lib/docs/animated_url_list/url.gform.dart#L444-L446
because the actual type is https://github.com/artflutter/reactive_forms_generator/blob/master/packages/reactive_forms_generator/example/lib/docs/animated_url_list/url.gform.dart#L349-L350