VideoSize class final

A video canvas size in pixels, with presets for the common aspect ratios.

Pass one to Video(size: VideoSize.reels) instead of spelling out width/height; an explicit preset always wins over the loose dimension parameters. Sizes are plain values — equality compares dimensions, so two VideoSize(1080, 1920) are interchangeable.

Annotations

Constructors

VideoSize(int width, int height)
Creates a canvas of width × height pixels; both must be positive.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
height int
The canvas height in pixels.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
The canvas width in pixels.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

fourK → const VideoSize
3840 × 2160 — landscape 4K UHD.
hd → const VideoSize
1920 × 1080 — landscape full HD.
reels → const VideoSize
1080 × 1920 — the canonical vertical format (Reels, Shorts, TikTok).
square → const VideoSize
1080 × 1080 — the square format for feeds.
story → const VideoSize
An alias of reels: stories share the canonical vertical format.