ScaleType enum

Defines how video content should be scaled within its container.

These scale types determine how the VAP animation is displayed when the animation dimensions don't exactly match the widget size.

Example usage:

VapView(
  scaleType: ScaleType.fitCenter, // Maintain aspect ratio, fit within bounds
)
Inheritance
Available extensions

Values

fitCenter → const ScaleType

Scales the video to fit within the container while maintaining aspect ratio. The entire video will be visible, but there may be empty space if the aspect ratios don't match.

const ScaleType("fitCenter")
centerCrop → const ScaleType

Scales the video to fill the container while maintaining aspect ratio. The video may be cropped if aspect ratios don't match, but no empty space will be visible.

const ScaleType("centerCrop")
fitXY → const ScaleType

Scales the video to exactly fill the container bounds. This may distort the video if aspect ratios don't match, but ensures the entire container is filled.

const ScaleType("fitXY")

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
key String
The string key used for native platform communication.
final
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
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

Constants

values → const List<ScaleType>
A constant List of the values in this enum, in order of their declaration.