How to change Amplify backend in local Flutter project

Viewed 106

I have an Flutter project which is using Amazon Amplify resources.

My problem is that I have two Amplify solutions ( seperate appId, not just dev/prod environments ) that I'm using with my Flutter application.

Whenever I try to switch the Amplify files in local with : amplify pull --appId --envName dev.

I receive the error: Amplify appId mismatch. You are currently working in the amplify project with Id

Is there a way to switch appId's without deleting the Amplify CLI and installing it again?

1 Answers

It is supposed that when you go to the Backend environment of the app in Amplify it shows you:

amplify pull --appId ######### --envName dev

With the #'s as the id of the app. After that, you use:

amplify init

And this should allow you to select the new environment of the app.

Related