I have an existing AppSync API that I need to use in a new flutter app. After initializing amplify in my project, i run the command "amplify add codegen --apiId xxxxxxxxxxxxxxxxx"
This results in a message saying "Successfully added API xxxx to your amplify project" but then says "Flutter Only supports the command $amplify codegen models."
When I run amplify codegen models, it says No Appsync API configured. Please add an API. When I run amplify status, it shows the API ,but with no provider plugin. If I update the backend-config.json in amplify/backend directory with the awscloudformation provider plugin, and run either amplify push or amplify codegen models it tells me there is no API folder in amplify/backend
Has anyone had success getting codegen to work for an existing appsync api with Flutter? I have tried everything.
For now the only way seems to be to use the multi-frontend approach found here: https://docs.amplify.aws/cli/teams/multi-frontend/
Basically, you pull the backend from another project and use the models in Flutter.