title: how to change firebase predefined realtime database in flutter
body: <p>Hello I have the following problem, in a flutter project connected to firebase and I use the database in real time everything worked correctly until today I found myself needing to change the BD reference
  that is to say in firebase now I have 2 BD <strong>&quot;https://debug.firebaseio.com&quot;</strong> and <strong>&quot;https://release.firebaseio.com&quot;</strong>
  now my problem is that I can't change the reference so that it points to the new bd, it just grabs me
  the old one that is selected by default
  already try this <code>_dbRef = FirebaseDatabase(databaseURL:&quot;https://debug.firebaseio.com&quot;).reference ();</code>
  and also try doing manual configuration:</p>
  <pre><code>FirebaseApp firebaseApp = await FirebaseApp.configure (
      name: 'dbDebug',
      options: FirebaseOptions (
        googleAppID: '$ googleId',
        apiKey: '$ apiKey',
        projectID: '$ projectId',
        databaseURL: 'https://debug.firebaseio.com',
      )
    );
  </code></pre>
  <p>and then pass it the parameter _dbRef = new FirebaseDatabase (app: firebaseApp).reference ()
  but in the end it still points to the default firebase db.
  Has anyone come across something similar and solved it?</p>
  <p>// I tried this answer in the following question <a href="https://stackoverflow.com/questions/57318094/using-flutter-how-to-use-more-than-one-firebase-realtime-database-in-the-same-ap">Using flutter how to use more than one firebase realtime database in the same App</a>
  // but now I can't use .instance after FirebaseDatabase ()</p>
  <pre><code>String fdbUrl1 = &quot;https://my-firebase-db-1.firebaseio.com&quot;
  String fdbUrl2 = &quot;https://my-firebase-db-2.firebaseio.com&quot;
  
  final databaseReference1 = FirebaseDatabase (databaseURL: fdbUrl1) .instance.reference ();
  final databaseReference2 = FirebaseDatabase (databaseURL: fdbUrl2) .instance.reference ();
  </code></pre>
  <p>pubspec.yaml</p>
  <p>firebase_core: 0.4.5
  firebase_database: ^ 3.1.6</p>