setOrientationState method
Future method to set the device orientation lock status.
Implementation
@override
Future<void> setOrientationState(bool enabled) async {
try {
await methodChannel
.invokeMethod('setOrientationState', {'enabled': enabled});
} on PlatformException catch (e) {
log('Error setting orientation lock: ${e.message}');
}
}