App ID
, AuthKey
, and Region
of your CometChat application when initializing the SDK.
i. Register on CometChat
Each CometChat application can be integrated with a single client app. Within the same application, users can communicate with each other across all platforms, whether they are on mobile devices or on the web.iii. Platform & IDE Setup
pubspec.yaml
file:
pubspec.yaml
minSdkVersion
in your Android project configuration, located at android/app/build.gradle
:
Store your CometChat credentials in a config file to simplify environment management and avoid hardcoding.
login()
method. You’ll receive a User
object upon success.
cometchat-uid-1
cometchat-uid-2
cometchat-uid-3
cometchat-uid-4
cometchat-uid-5
For more information, refer to the documentation on Init and Login.
Extract credentials into a separate file (cometchat_config.dart
) for better maintainability.
Navigator.push()
for mobile-first navigation.Navigator
.CometChatMessages
widget with preselected user/group.BottomNavigationBar
to switch between core features.