setPreferredMode static method Null safety

Future<void> setPreferredMode(
  1. DisplayMode mode

setPreferredMode changes the preferred mode. It is upto the system to use this. Sometimes system can choose not switch to this based on internal heuristics. Check active to see if it actually switches.


static Future<void> setPreferredMode(DisplayMode mode) async {
  return await _channel.invokeMethod<void>(
    <String, dynamic>{'mode':},