FlutterDisplayMode class Null safety

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

active Future<DisplayMode>
active fetches the currently active mode. This is not always the preferred mode set by setPreferredMode. It can be altered by the system based on the display settings.
read-only
preferred Future<DisplayMode>
preferred returns the currently preferred mode. If not manually set with setPreferredMode then it will be DisplayMode.auto.
read-only
supported Future<List<DisplayMode>>
supported returns all the modes that can be set as the preferred mode. This always returns DisplayMode.auto as one of the modes.
read-only

Static Methods

setHighRefreshRate() Future<void>
setHighRefreshRate changes preferred mode to highest refresh rate available maintaining current resolution
setLowRefreshRate() Future<void>
setLowRefreshRate changes preferred mode to lowest refresh rate available maintaining current resolution
setPreferredMode(DisplayMode mode) Future<void>
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.