init method

  1. @override
dynamic init(
  1. ChatBuilder builder
)
override

Initializes the MirrorFly platform with the given builder configuration.

This method sets up the initial configuration for the MirrorFly platform using the provided ChatBuilder instance. It is essential to call this method before performing any operations with the MirrorFly SDK to ensure that the SDK is properly configured.

builder: A ChatBuilder instance containing the configuration settings for the FlyChat SDK.

Throws UnimplementedError if the method has not been implemented in the subclass. This has been deprecated in favor of initializeSDK.

Implementation

@override
init(ChatBuilder builder) async {
  enableDebugLog = builder.enableDebugLog;
  if (!_messageOnReceivedStreamController.hasListener) {
    addStreamsAllToStreamController();
  }
  await mirrorFlyMethodChannel.invokeMethod('init', builder.build());
}