Add a CopilotModule class through which you'll interface with your flutter dart code using the FlutterMethodChannel.
Inside the setupMethodChannel function, we'll "capture" function calls from the dart side(with or without parameters) and point them to our native side fuctions.
In this following example we're using the startSession, endSession and sendEvent functions.
Initialize the CopilotModule in your AppDelegate through which all Copilot functions will be activated and then initialize Copilot.cx, setting it with a list of EventLogProviders as shown below (please refer the Managing providers section).