resize method

Future<void> resize(
  1. int arg_width,
  2. int arg_height
)

Implementation

Future<void> resize(int arg_width, int arg_height) async {
  final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
      'dev.flutter.pigeon.AndroidWindowApi.resize', codec, binaryMessenger: _binaryMessenger);
  final Map<Object?, Object?>? replyMap =
      await channel.send(<Object>[arg_width, arg_height]) as Map<Object?, Object?>?;
  if (replyMap == null) {
    throw PlatformException(
      code: 'channel-error',
      message: 'Unable to establish connection on channel.',
    );
  } else if (replyMap['error'] != null) {
    final Map<Object?, Object?> error = (replyMap['error'] as Map<Object?, Object?>?)!;
    throw PlatformException(
      code: (error['code'] as String?)!,
      message: error['message'] as String?,
      details: error['details'],
    );
  } else {
    return;
  }
}