You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have the ability to leverage features of Amplify Gen 2 (particularly the graphql model gen) in pure Dart packages, in addition to in Flutter projects. This would allow devs to integrate new Amplify features in projects and create packages that could be used in multiple Flutter apps, instead of being bound to a single app.
Currently, this is not possible because of how GraphQL model code is generated into Dart. Specifically, this generated constructor passes in a Flutter app, but throws a field_initializer_not_assignable error in a Dart app:
It would be nice if the codegen that generates Dart code from the backend schema generates code that is supported in pure Dart packages.
Describe alternatives you've considered
The only alternative I can think of would be to only use Amplify on Flutter apps, not Dart packages, which would require repeating schema definitions across multiple Dart projects, and prohibit abstracting model generation within app architecture.
Additional context
No response
Is this something that you'd be interested in working on?
👋 I may be able to implement this feature request
Would this feature include a breaking change?
⚠️ This feature might incur a breaking change
The text was updated successfully, but these errors were encountered:
I'll keep this as a feature request to modify the generated code to be compliant with very_good_analysis. In the mean time (as you have mentioned), ignore the generated files from any code analysis tools that cause issues.
Describe the feature you'd like to request
It would be nice to have the ability to leverage features of Amplify Gen 2 (particularly the graphql model gen) in pure Dart packages, in addition to in Flutter projects. This would allow devs to integrate new Amplify features in projects and create packages that could be used in multiple Flutter apps, instead of being bound to a single app.
Currently, this is not possible because of how GraphQL model code is generated into Dart. Specifically, this generated constructor passes in a Flutter app, but throws a
field_initializer_not_assignable
error in a Dart app:Describe the solution you'd like
It would be nice if the codegen that generates Dart code from the backend schema generates code that is supported in pure Dart packages.
Describe alternatives you've considered
The only alternative I can think of would be to only use Amplify on Flutter apps, not Dart packages, which would require repeating schema definitions across multiple Dart projects, and prohibit abstracting model generation within app architecture.
Additional context
No response
Is this something that you'd be interested in working on?
Would this feature include a breaking change?
The text was updated successfully, but these errors were encountered: