Documentation

Documentation

YourOwn SetupYourOwn SDKYourOwn API
Sphere SetupSphere SDKSphere API
  • Resources

›Getting started for flutter

Getting started

  • Copilot.cx Mobile SDK
  • Importing the iOS SDK
  • Importing the Android SDK
  • SDK configuration

Getting started for flutter

  • Importing the Copilot.cx Android SDK for Flutter
  • Importing the Copilot.cx iOS SDK for Flutter
  • Interacting with the Copilot.cx SDK in Dart

Getting around

  • Hello Copilot

Reference

  • Manage session
  • Report
  • In-app messages
  • Authentication

Event reporting guide

  • Predefined events
  • Custom events

Appendix

  • Releases
  • Open source mapping

Interacting with the Copilot.cx SDK in Dart

Use Copilot.cx SDK through dart code

  1. Inside your project, create a MethodChannel
const channel = MethodChannel('myProjectChannelName');

The Channel name should be the same on all sided (iOS, Android and Flutter).

  1. Add add functions that will invoke the native code through the MethodChannel (iOS and Android)

void _startSession(String userId) {
    channel.invokeMethod("startSession", {"userId": userId, "isConsentGiven": true});
}

void _endSession() {
    channel.invokeMethod("endSession");
}

void _sendEvent() {
    var eventName = "eventName";
    var eventParams = {
        "key1": "value1",
        "key2": "value2"
    };
    channel.invokeMethod("sendEvent", {
        "eventName": eventName,
        "eventParams": eventParams}
    );
}
  

← Importing the Copilot.cx iOS SDK for FlutterHello Copilot →
Copilot
Mail: hello@copilot.cx
Call: (212).398.0001
© Copilot.cx 2025