FlutterDisplayMode class
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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.
no setter
-
preferred
→ Future<
DisplayMode> -
preferred returns the currently preferred mode. If not manually set
with setPreferredMode then it will be DisplayMode.auto.
no setter
-
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.
no setter
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.