cometchat/cometchat-uikit-flutter/cometchat-flutter-v5-to-v6-migration

Claude Code and agent skill by cometchat/cometchat-uikit-flutter

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when migrating a CometChat Flutter app from UIKit v5 (cometchat_calls_uikit + GetX) to UIKit v6 (cometchat_chat_uikit unified package, no GetX). Covers import changes, dependency cleanup, GetX removal, init/login pattern changes, navigation rewrites, screen structure flattening, notification service updates, and BuilderSettings removal. Also use when seeing imports from cometchat_calls_uikit, get/get.dart, or v5-era patterns like GetBuilder, Get.put, Get.find, PageManager, BuilderSettings,…

Install

npx vskill@latest install cometchat/cometchat-uikit-flutter/cometchat-flutter-v5-to-v6-migration

SKILL.md

The same SKILL.md was published earlier as cometchat/cometchat-uikit-flutter/cometchat-flutter-v5-to-v6-migration.

CometChat Flutter — v5 to v6 Migration

Complete guide for migrating a consumer app from UIKit v5 to v6.

What Changed

Areav5v6
Packagescometchat_chat_uikit + cometchat_calls_uikit (separate)cometchat_chat_uikit only (calls bundled)
StateGetX (Get.put, GetBuilder, Obx, .obs, RxBool)Plain StatefulWidget + setState()
NavigationPageManager (GetxController singleton)Direct Navigator.push
InitInitializeCometChat.init() + CometChatCallingExtension() + extensions + aiFeatureInline CometChatUIKit.init() + enableCalls: true + CallingConfiguration()
Calls SDK initCometChatCallingExtension() in extensions listAutomatic with enableCalls: true: the UI Kit sets the Calls SDK up in init/login
ScreensSeparate controller + widget files per screenSingle file, state in StatefulWidget
DashboardMyHomePage/MyPageView with GetX PageManagerHomeScreen with IndexedStack
MessagesMessagesSample + CometChatMessagesControllerMessagesScreen with listener mixins
Builder systemBuilderSettings, BuilderColor, BuilderTypographyRemoved — use ComponentToggles
NotificationsVoipNotificationHandler, APNSServiceVoipCallHandler, ApnsService
Extra depsget, google_sign_in, firebase_auth, bugsee_flutter, shared_preferences, toast, mobile_scanner, app_badge_plusNone of these
Localizationcc.Translations.delegate + GlobalMaterialLocalizations in MaterialAppHandled by UIKit internally
Call screencallMain() entry point + CallApp + CallScreen widgetCallScreenOverlay.show() (overlay, no separate entry point)
Android minSdk2426 (required by cometchat_calls_sdk)

Step 1: pubspec.yaml

yaml
# ❌ v5
dependencies:
cometchat_chat_uikit:
path: ../chat_uikit
cometchat_calls_uikit:
path: ../calls_uikit
get: ^4.6.5
google_sign_in: ^6.2.2
firebase_auth: ^5.3.4
bugsee_flutter: ^8.0.0
permission_handler: ^11.3.1
shared_preferences: ^2.2.1
toast: ^0.3.0
mobile_scanner: ^7.1.2
app_badge_plus: ^1.2.6
# ✅ v6
dependencies:
cometchat_chat_uikit:
hosted: https://dart.cloudsmith.io/cometchat/cometchat/
version: 6.0.0-beta2
firebase_core: ^3.9.0
firebase_crashlytics: ^4.1.3
firebase_messaging: ^15.1.6
flutter_local_notifications: ^18.0.0
flutter_callkit_incoming: ^2.5.0
http: ^1.2.0
intl: ^0.20.2

Step 2: Fix All Imports

v5 Importv6 Import
package:cometchat_calls_uikit/cometchat_calls_uikit.dartpackage:cometchat_chat_uikit/cometchat_calls_uikit.dart
package:get/get.dartRemove entirely
builder/builder_settings.dartRemove — use ComponentToggles
builder/builder_settings_helper.dartRemove
utils/page_manager.dartRemove — use Navigator.push
utils/initialize_cometchat.dartRemove — inline init
utils/bool_singleton.dartRemove
utils/text_constants.dartRemove
prefs/shared_preferences.dartRemove

Step 3: Rewrite Init

dart
// ❌ v5 — helper class with CometChatCallingExtension + extensions + aiFeature
class InitializeCometChat {
static Future<bool> init() async {
final builder = UIKitSettingsBuilder()
..callingExtension = CometChatCallingExtension() // REMOVED in v6
..extensions = CometChatUIKitChatExtensions.getDefaultExtensions() // REMOVED
..aiFeature = CometChatUIKitChatAIFeatures.getDefaultAiFeatures(); // REMOVED
// ...
}
}
// ✅ v6 — inline, enableCalls + CallingConfiguration replace all three
final settings = (UIKitSettingsBuilder()
..subscriptionType = CometChatSubscriptionType.allUsers
..region = AppCredentials.region
..appId = AppCredentials.appId
..authKey = AppCredentials.authKey
..enableCalls = true
..callingConfiguration = CallingConfiguration())
.build();
CometChatUIKit.init(uiKitSettings: settings, onSuccess: (_) { ... });
Removed v5 UIKitSettingsBuilder properties
  • callingExtension → replaced by enableCalls: true
  • extensions → removed (extensions auto-registered in v6)
  • aiFeature → removed (AI features auto-registered in v6)
Calls SDK Init for Cached Sessions
dart
// ❌ v5 — CometChatCallingExtension handled it automatically
// ✅ v6 — with enableCalls, nothing to add. CometChatUIKit.init restores the
// cached session and, before its onSuccess, starts call handling (incoming
// call listener) and initialises and logs the user into the Calls SDK.
// login / loginWithAuthToken do the same for a fresh login, and logout stops
// it and logs the Calls SDK out.
CometChatUIKit.init(
uiKitSettings: settings, // ..enableCalls = true ..callingConfiguration = ...
onSuccess: (_) {
final hasUser = CometChatUIKit.loggedInUser != null;
// Route to home or login.
},
);
  • The Calls set-up is bounded: onSuccess (and the returned future) comes within about 22 s even when the Calls SDK is slow or fails, and a Calls failure never becomes onError (it is retried when a call needs it). Show a splash rather than holding runApp on await CometChatUIKit.init(...).
  • Configure the call UI with UIKitSettings.callingConfiguration. CallEventService.instance.init(configuration:) is deprecated (removal in 7.0.0): its configuration is only used when UIKitSettings.callingConfiguration is not set. Do not call it with an empty CallingConfiguration().
  • Only apps that keep enableCalls off and want the incoming call UI call await CallEventService.instance.init(); themselves, after login.
  • CallEventService.instance.waitForCallsSdk() returns within 22 s. CallEventService.instance.reinitializeAfterSession() is deprecated and no longer needed after a call.

Step 4: Remove GetX

PageManager → Navigator.push
dart
// ❌ v5
Get.put(PageManager());
Get.find<PageManager>().navigateToMessages(context: context, user: user);
// ✅ v6
Navigator.push(context, MaterialPageRoute(
builder: (_) => MessagesScreen(user: user),
));
GetBuilder → StatefulWidget with listener mixins
dart
// ❌ v5
GetBuilder<CometChatMessagesController>(
init: messagesController,
tag: messagesController.tag,
builder: (controller) => Scaffold(/* ... */),
)
// ✅ v6
class _MessagesScreenState extends State<MessagesScreen>
with UserListener, CometChatUserEventListener,
GroupListener, CometChatGroupEventListener {
late User? _user;
late Group? _group;
// setState() instead of controller.update()
}
Rx variables → plain state
dart
// ❌ v5
var isBlockLoading = false.obs;
// Usage: isBlockLoading.value = true;
// ✅ v6
bool _isUserBlocked = false;
// Usage: setState(() => _isUserBlocked = true);
Obx dialogs → StatefulBuilder
dart
// ❌ v5 — Obx in dialog for loading indicator
Obx(() => isLoading.value ? CircularProgressIndicator() : Icon(Icons.check))
// ✅ v6 — StatefulBuilder in dialog
StatefulBuilder(builder: (context, setDialogState) {
return isLoading ? CircularProgressIndicator() : Icon(Icons.check);
})

Step 5: Removed v5 APIs

These v5 widget parameters/classes don't exist in v6:

v5 APIStatus in v6
CometChatCompactMessageComposerRemoved — use CometChatMessageComposer
CometChatAIAssistantChatHistoryRemoved
CometChatMessageHeader options paramRemoved — use trailingView
CometChatMessageList messageId paramRemoved — use goToMessageId
CometChatMessageList hideFlagOptionRemoved
CometChatMessageList generateConversationSummaryRemoved
getDataSource() on message listRemoved
AssetConstants.conversationSummaryOutlinedRemoved
CometChatBannedMembers (standalone widget)Not exported in v6
CometChatCallLogParticipants (standalone)Not exported in v6
CometChatCallLogRecordings (standalone)Not exported in v6
CometChatCallLogHistory (standalone)Not exported in v6
CometChatCallingExtension()Replaced by enableCalls: true + CallingConfiguration()
CometChatUIKitChatExtensions.getDefaultExtensions()Removed — auto-registered
CometChatUIKitChatAIFeatures.getDefaultAiFeatures()Removed — auto-registered
CallSettingsBuilderReplaced by SessionSettingsBuilder
FormatPatterns.stripFormatting()Removed
CallStateController.instanceReplaced by CallStateService.instance
CallSettingsBuilder → SessionSettingsBuilder
dart
// ❌ v5
CallSettingsBuilder()
..enableDefaultLayout = true
// ✅ v6
SessionSettingsBuilder()
..setLayout(LayoutType.tile)
..startVideoPaused(true) // for audio calls
..hideSwitchCameraButton(true)
..hideToggleVideoButton(true)

Step 6: Flatten Screen Structure

# ❌ v5 — controller + widget per screen
messages/
├── messages.dart # MessagesSample widget
└── messages_controller.dart # GetxController
group_info/
├── cometchat_group_info.dart
└── cometchat_group_info_controller.dart
# ✅ v6 — single file per screen
screens/
├── messages_screen.dart # Widget + state + listeners
├── group_info_screen.dart
├── home_screen.dart
└── ...
Class Rename Map
v5 Classv6 Class
MyHomePage / MyPageViewHomeScreen
MessagesSampleMessagesScreen
GuardScreenGuardScreen (same name, rewritten)
LoginSampleUsersLoginScreen

Step 7: Update MaterialApp

dart
// ❌ v5 — localization delegates, BuilderTypography, callMain entry point
MaterialApp(
supportedLocales: const [Locale('en'), Locale('ar'), ...],
localizationsDelegates: const [
cc.Translations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
theme: ThemeData(
fontFamily: BuilderTypography.font,
extensions: [CometChatColorPalette(primary: BuilderColor.brandColor)],
),
navigatorKey: CallNavigationContext.navigatorKey,
)
// ✅ v6 — Material 3, no builder system, no localization delegates
MaterialApp(
debugShowCheckedModeBanner: false,
navigatorKey: LocalNotificationService.navigatorKey,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
darkTheme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple, brightness: Brightness.dark),
useMaterial3: true,
brightness: Brightness.dark,
),
themeMode: ThemeMode.system,
)

Remove the callMain() entry point and CallApp/CallScreen widget entirely — v6 uses CallScreenOverlay.show().

Step 8: Update Notification Services

v5 Classv6 Class
VoipNotificationHandlerVoipCallHandler
APNSServiceApnsService
FirebaseServiceFirebaseService (same)
VoIP Cold Start
dart
// ❌ v5 — handled in dashboard initState
VoipNotificationHandler.handleNativeCallIntent(context);
// ✅ v6 — init early in main(), markSdkReady after login
VoipCallHandler.instance.init(); // in main()
await VoipCallHandler.instance.markSdkReady(); // after login

Step 9: resizeToAvoidBottomInset

dart
// ❌ v5 — default true, SafeArea wrapping
Scaffold(body: SafeArea(child: Column(children: [messageList, composer])))
// ✅ v6 — must be false, composer handles keyboard internally
Scaffold(
resizeToAvoidBottomInset: false,
body: Column(children: [Expanded(child: messageList), composer]),
)

Step 10: Android Build

In android/app/build.gradle(.kts):

kotlin
defaultConfig {
minSdk = 26 // Was 24 in v5, required by cometchat_calls_sdk in v6
}

In android/gradle.properties:

properties
android.enableJetifier=true // Required for support library conflicts

Step 11: Delete v5 Files

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
520
Repository forks
42
7-day trend score
31

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cometchat/cometchat-uikit-flutter/cometchat-flutter-v5-to-v6-migration/badge)](https://verified-skill.com/skills/cometchat/cometchat-uikit-flutter/cometchat-flutter-v5-to-v6-migration)

Something wrong with this skill or its page? Tell us.