ScaleOption class
The scale option is used to scale image.
The width and height must be greater than 0.
By default, the aspect ratio is not guaranteed.
If you need to maintain the aspect ratio, you can set aspectRatio
to true.
About keepRatio
and keepWidthFirst
document
When the keepRatio is false, the keepWidthFirst will be ignored.
- Implemented types
Constructors
- ScaleOption(int width, int height, {bool keepRatio = false, bool keepWidthFirst = true})
-
The scale option is used to scale image.
const
Properties
- canIgnore → bool
-
Whether it is ture, it can be ignored.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
The height of scale.
final
- keepRatio → bool
-
The scale option is used to scale image.
final
- keepWidthFirst → bool
-
The scale option is used to scale image.
final
- key → String
-
The key of transfer value.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transferValue
→ Map<
String, Object> -
The value of transfer value.
no setteroverride
- width → int
-
The width of scale.
final
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