supported property Null safety

Future<List<DisplayMode>> supported

supported returns all the modes that can be set as the preferred mode. This always returns as one of the modes.


static Future<List<DisplayMode>> get supported async {
  final List<dynamic> rawModes =
      (await _channel.invokeMethod<List<dynamic>>('getSupportedModes'))!;
  final List<DisplayMode> modes = i) {
    final Map<String, dynamic> item =
        (i as Map<dynamic, dynamic>).cast<String, dynamic>();
    return DisplayMode.fromJson(item);
  return modes;