TestDisplay class

A version of Display that can be modified to allow for testing various use cases.

Updates to the TestDisplay will be surfaced through PlatformDispatcher.onMetricsChanged.

Implemented types

Constructors

TestDisplay(TestPlatformDispatcher platformDispatcher, Display display)
Creates a new TestDisplay backed by the given Display.

Properties

devicePixelRatio double
The device pixel ratio to use for this test.
getter/setter pairoverride-getter
hashCode int
The hash code for this object.
no setterinherited
id int
A unique identifier for this display.
no setteroverride
refreshRate double
The refresh rate to use for this test.
getter/setter pairoverride-getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size
The size of the Display to use for this test.
getter/setter pairoverride-getter

Methods

noSuchMethod(Invocation invocation) → dynamic
This gives us some grace time when the dart:ui side adds something to Display, and makes things easier when we do rolls to give us time to catch up.
override
reset() → void
Resets all values on this TestDisplay.
resetDevicePixelRatio() → void
Resets devicePixelRatio to the default value for this display.
resetRefreshRate() → void
Resets refreshRate to the default value for this display.
resetSize() → void
Resets size to the default value for this display.
toString() String
A string representation of this object.
inherited

Operators

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