title: Flutter - Unhandled Exception: [core/duplicate-app]
body: <p>I am building a flutter app with firebase. The firebase services I am using are Realtime database and Authentication. The app is normally starting as usual without throwing any exception, but while I am hot restarting the app, the app freezes throwing the following exception:</p>
  <pre><code>Unhandled Exception: [core/duplicate-app] A Firebase App named &quot;db2&quot; already exists
  </code></pre>
  <p>I believe there's something wrong with initializing FirebaseApp. The initialization code in main.dart reads:</p>
  <pre><code>WidgetsFlutterBinding.ensureInitialized();
    final FirebaseApp app = await Firebase.initializeApp(
      name: 'db2',
  </code></pre>
  <p>Can somebody help me solve this issue? Thank you!</p>