Skip to main content
This guide helps you migrate from CometChat Flutter UI Kit V5 to V6. V6 is a major architectural refactor that introduces clean architecture with BLoC state management while maintaining the same user-facing widget APIs.

Key Changes

Step-by-Step Migration

1. Update Imports

2. Update Initialization

3. Replace DataSource Calls

4. Update Dependencies

pubspec.yaml

5. State Management Migration (Advanced)

If you were directly using controllers:

Controller → BLoC Mapping

Migration Checklist

  1. ☐ Replace all CometChatXxxController usage with XxxBloc
  2. ☐ Replace CometChatUIKit.getDataSource().xxx() with MessageTemplateUtils.xxx()
  3. ☐ Remove extensions and aiFeature from UIKitSettings
  4. ☐ Replace cometchat_uikit_shared imports with cometchat_chat_uikit
  5. ☐ Test all features after migration

Property Changes

This section outlines the property changes between V5 and V6. V6 introduces BLoC-based state management and consolidates styling into ThemeData extensions.

Architectural Changes

Conversations

New Properties (V6)

Removed Properties (from V5)

Message List

New Properties (V6)

Removed Properties (from V5)

Message Composer

New Properties (V6)

Removed Properties (from V5)

Message Header

New Properties (V6)

Removed Properties (from V5)

Users

New Properties (V6)

Removed Properties (from V5)

Groups

New Properties (V6)

Removed Properties (from V5)

Group Members

New Properties (V6)

Renamed Properties