registerWith static method

void registerWith(
  1. Registrar registrar
)

Implementation

static void registerWith(Registrar registrar) {
  //ZimFlutterSdkPlatform.instance = ZimFlutterSdkWeb();
  final MethodChannel channel = MethodChannel(
    'zego_zpns',
    const StandardMethodCodec(),
    registrar,
  );

  final eventChannel = PluginEventChannel(
      'zpns_event_handler', const StandardMethodCodec(), registrar);

  final pluginInstance = ZegoZpnsPlugin();
  channel.setMethodCallHandler(pluginInstance.handleMethodCall);
  eventChannel.setController(ZegoZpnsPlugin._evenController);

  _evenController.stream.listen((event) {
    _eventListener(event);
  });
}