checkScreenOrientation method

  1. @override
Future<ScreenOrientationTypes?> checkScreenOrientation()
override

Checks the current screen orientation.

This function checks the current screen orientation of the device and returns the corresponding orientation type as an enum value of ScreenOrientationTypes. It returns null if the orientation can't be determined.

Returns:

Example Usage:

ScreenOrientationTypes? orientation = await checkScreenOrientation();
if (orientation != null) {
  // Handle the orientation logic here
} else {
  // Handle case when orientation can't be determined
}

This method should be implemented to provide the actual screen orientation check logic.

Implementation

@override
Future<ScreenOrientationTypes?> checkScreenOrientation() async {
  return await ThanPkg.android.app.checkOrientation();
}