Resolution class
The resolution of a device defined by the nativeSize of the Device and its scaling factor.
- Annotations
-
- @freezed
Constructors
- Resolution({required DeviceSize nativeSize, required double scaleFactor})
-
Creates a new instance based on nativeSize and scaleFactor
constfactory
- Resolution.dimensions({required double nativeWidth, required double nativeHeight, required double scaleFactor})
-
Crates a newinstance based on nativeWidth, nativeHeight and scaleFactor
factory
Properties
-
copyWith
→ $ResolutionCopyWith<
Resolution> -
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- logicalSize → DeviceSize
-
The logicalSize defines the number of pixels in the render engine.
It is calculated by using the following formula:
logicalSize = nativeSize / scaleFactor
no setter
- nativeSize → DeviceSize
-
The nativeSize defines the number of pixels of the device screen.
It is used to calculate the logical size of the device by
using the following formula:
logicalSize = nativeSize / scaleFactor
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleFactor → double
-
The scaleFactor is used to calculate the logical size of the device by
using the following formula:
logicalSize = nativeSize / scaleFactor
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