setOrientation method

Future<void> setOrientation({
  1. required Orientation orientation,
  2. required Map<String, dynamic> creationParams,
})

Notifies the current orientation.

This notification is handled by AlhPdfView and is important to make sure that the PDF is still displayed when changing the orientation. Otherwise a blank screen would be visible.

For a short moment, the screen is white, when the device is rotated and redrawn. Only for Android.

Implementation

Future<void> setOrientation({
  required Orientation orientation,
  required Map<String, dynamic> creationParams,
}) async {
  await _channel.invokeMethod('setOrientation', {
    'orientation': orientation.toString(),
    ...creationParams,
  });
}