flutter_firebase_chat_core icon indicating copy to clipboard operation
flutter_firebase_chat_core copied to clipboard

Where to define App Name

Open 1074f opened this issue 1 year ago • 1 comments
trafficstars

I have tried to adjust collections and App Name with the params in firebase_chat_core.dart on line 20


  /// Config to set custom names for rooms and users collections. Also
  /// see [FirebaseChatCoreConfig].
  FirebaseChatCoreConfig config = const FirebaseChatCoreConfig(
    'my_app',
    'chat_rooms',
    'chat_users',
  );

But the app boot with an App named "DEFAULT"

Restarted application in 713ms.                                                                                                                                                                                                                                 
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: [core/duplicate-app] A Firebase App named "[DEFAULT]" already exists                                                                                                                    
#0      MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:134:11)                                                                                                                   
<asynchronous suspension>                                                                                                                                                                                                                                       
#1      Firebase.initializeApp (package:firebase_core/src/firebase.dart:43:31)                                                                                                                                                                                  
<asynchronous suspension>                                                                                                                                                                                                                                       
#2      main (package:example/main.dart:10:3)                                                                                                                                                                                                                   
<asynchronous suspension>                                       

1074f avatar Mar 04 '24 03:03 1074f

I will be removing this package soon, please just copy the code and adjust as needed - it is not much anyway if you remove all "customise" options from the codebase

demchenkoalex avatar Mar 04 '24 18:03 demchenkoalex