> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-platform-docs-release.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrading From V3

> Migrate your CometChat Flutter SDK integration from v3 to v4 with updated dependencies and import statements.

<Accordion title="AI Integration Quick Reference">
  Key changes from v3 to v4:

  * Chat SDK: `cometchat_sdk` (replaces `cometchat_pro_sdk`)
  * Calls SDK: `cometchat_calls_sdk` (replaces `cometchat_pro_calls_sdk`)
  * Import: `import 'package:cometchat_sdk/cometchat_sdk.dart'`
  * Import Calls: `import 'package:cometchat_calls_sdk/cometchat_calls_sdk.dart'`
</Accordion>

Upgrading from v3 to v4 is straightforward — the API surface is the same, only the package names and imports changed. Follow the [v4 setup instructions](/sdk/flutter/setup) first, then update your dependencies and imports as shown below.

## Update Dependencies

| SDK       | v3 Package                | v4 Package            |
| --------- | ------------------------- | --------------------- |
| Chat SDK  | `cometchat_pro_sdk`       | `cometchat_sdk`       |
| Calls SDK | `cometchat_pro_calls_sdk` | `cometchat_calls_sdk` |

Remove the v3 packages from `pubspec.yaml` and add the v4 packages:

```yaml theme={null}
dependencies:
  cometchat_sdk: ^4.0.33        # replaces cometchat_pro_sdk
  cometchat_calls_sdk: ^4.0.0   # replaces cometchat_pro_calls_sdk
```

Then run:

```bash theme={null}
flutter pub get
```

## Update Import Statements

Find and replace all import statements across your project:

| SDK       | v3 Import                                                               | v4 Import                                                       |
| --------- | ----------------------------------------------------------------------- | --------------------------------------------------------------- |
| Chat SDK  | `import 'package:cometchat_pro_sdk/cometchat_pro_sdk.dart'`             | `import 'package:cometchat_sdk/cometchat_sdk.dart'`             |
| Calls SDK | `import 'package:cometchat_pro_calls_sdk/cometchat_pro_calls_sdk.dart'` | `import 'package:cometchat_calls_sdk/cometchat_calls_sdk.dart'` |

```dart theme={null}
// v4 Chat SDK
import 'package:cometchat_sdk/cometchat_sdk.dart';

// v4 Calls SDK
import 'package:cometchat_calls_sdk/cometchat_calls_sdk.dart';
```

<Note>
  The API methods, class names, and listener interfaces are unchanged between v3 and v4. Once you update the packages and imports, your existing code should work without further modifications.
</Note>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Setup SDK" icon="gear" href="/sdk/flutter/setup">
    Install and configure the CometChat Flutter SDK
  </Card>

  <Card title="Key Concepts" icon="book" href="/sdk/flutter/key-concepts">
    Learn the core concepts behind CometChat v4
  </Card>
</CardGroup>
