rotateMyVideo method

  1. @override
Future<bool> rotateMyVideo(
  1. num rotation
)

Rotate the video when the device is rotated. This happens during the device onConfigurationChanged or onResume within Activity. For more information regarding onConfigurationChanged, see https://developer.android.com/reference/android/app/Activity#onConfigurationChanged(android.content.res.Configuration). For more information regarding onResume, see https://developer.android.com/reference/android/app/Activity#onResume().
Return true if the rotation was successful. Otherwise, this function returns false.

Implementation

@override
Future<bool> rotateMyVideo(num rotation) async {
  var params = <String, dynamic>{};
  params.putIfAbsent("rotation", () => rotation);

  return await methodChannel
      .invokeMethod<bool>('rotateMyVideo', params)
      .then<bool>((bool? value) => value ?? false);
}