onMethodCall method

  1. @override
Future onMethodCall(
  1. MethodCall call
)
override

Implementation

@override
Future onMethodCall(MethodCall call) async {
  switch (call.method) {
    case 'onSizeChanged':
      final newHeight = (call.arguments['height'] as num?)?.toDouble();
      final newWidth = (call.arguments['width'] as num?)?.toDouble();

      onSizeChanged(PlatformViewSize(newWidth, newHeight));
      break;
    default:
      return super.onMethodCall(call);
  }
}