AspectRatioValue class final
Define aspect ratio of player.
- Annotations
Constructors
- AspectRatioValue(double width, double height)
-
Create custom value of AspectRatioValue.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Length ratio in vertical.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → double
-
Get divided value of width : height
no setter
- width → double
-
Length ratio in horizontal.
final
Methods
-
calcHeightFromWidth(
double width) → double -
Calculate height value from given
width
. -
calcWidthFromHeight(
double height) → double -
Calculate width value from given
height
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
swapRatio(
) → AspectRatioValue - Swap width and height such that the ratio will formed as portrait if origin width is bigger than height and landscape if vice versa.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- square → const AspectRatioValue
- Definition of square ratio which all sides length are equals (1:1).
- standardHD → const AspectRatioValue
- Definition of high definition ratio (16:9).
- standardSD → const AspectRatioValue
- Definition of standard defition ratio (4:3).