skip to Main Content

I created a flutter project with my personal firebase, but now the client has already created his firebase, how do I change the account in a project, I’ve searched the documentation but without success?

2

Answers


  1. Unfortunately there is no easy way to switch.

    The information you configured when you first created flutter project on firebase, it has be configured again with clients Firebase.

    For example -> replace old GoogleService-info.plist, android package name and iOS bundleID with the new one.

    Login or Signup to reply.
  2. // Change Firebase project.
    // May require `firebase login` to access the project.
    
    firebase use MYPROJECT
    
    // Update Flutter configuration based on project. 
    // --yes will overwrite the configuration.
    
    flutterfire config 
      --project=MYPROJECT 
      --out=lib/firebase_options_dev.dart 
      --android-package-nam=com.myandroid.id 
      --platforms=web,android --yes
    
    // In case of using glocud, switch the project, too.
    // May require `gcloud login` to access the project.
    
    gcloud config set project MYPROJECT
    

    Note

    Some parameters of FlutterFire are optional, Flutterfire will try figuring out the correct values. Check all parameters with flutterfire --help config.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search