setup static method

void setup(
  1. FSAChatBottomContainerFlutterApi? api, {
  2. BinaryMessenger? binaryMessenger,
})

Implementation

static void setup(FSAChatBottomContainerFlutterApi? api,
    {BinaryMessenger? binaryMessenger}) {
  {
    final BasicMessageChannel<Object?> __pigeon_channel = BasicMessageChannel<
            Object?>(
        'dev.flutter.pigeon.chat_bottom_container.FSAChatBottomContainerFlutterApi.keyboardHeight',
        pigeonChannelCodec,
        binaryMessenger: binaryMessenger);
    if (api == null) {
      __pigeon_channel.setMessageHandler(null);
    } else {
      __pigeon_channel.setMessageHandler((Object? message) async {
        assert(message != null,
            'Argument for dev.flutter.pigeon.chat_bottom_container.FSAChatBottomContainerFlutterApi.keyboardHeight was null.');
        final List<Object?> args = (message as List<Object?>?)!;
        final double? arg_height = (args[0] as double?);
        assert(arg_height != null,
            'Argument for dev.flutter.pigeon.chat_bottom_container.FSAChatBottomContainerFlutterApi.keyboardHeight was null, expected non-null double.');
        try {
          api.keyboardHeight(arg_height!);
          return wrapResponse(empty: true);
        } on PlatformException catch (e) {
          return wrapResponse(error: e);
        } catch (e) {
          return wrapResponse(
              error: PlatformException(code: 'error', message: e.toString()));
        }
      });
    }
  }
}