VideoGravity enum
Specifies how a video should be resized or scaled to fit within its container.
This enum corresponds to common video content modes, similar to AVLayerVideoGravity on Apple platforms or scale types on Android.
Constructors
- VideoGravity(int rawValue)
-
Creates a VideoGravity with the associated integer raw value.
const
Values
- resize → const VideoGravity
-
Stretches the video to completely fill the container.
The aspect ratio is not preserved, which may result in distortion.
const VideoGravity(0) - resizeAspect → const VideoGravity
-
Scales the video to fit entirely within the container while preserving its aspect ratio.
This may result in letterboxing (empty space on the top/bottom or sides).
const VideoGravity(1) - resizeAspectFill → const VideoGravity
-
Scales the video to fill the entire container while preserving its aspect ratio.
Parts of the video may be clipped if the aspect ratios do not match.
const VideoGravity(2)
Properties
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
Constants
-
values
→ const List<
VideoGravity> - A constant List of the values in this enum, in order of their declaration.