MediaPlacement class

How the media sits on the 1080×1920 canvas.

The media is first fitted inside the canvas (contain), then scaled by scale around the canvas centre and moved by offset. See StoryCanvas.mediaRect.

Annotations

Constructors

MediaPlacement({double scale = 1, Offset offset = Offset.zero})
Creates a placement.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
offset → Offset
Translation of the media centre from the canvas centre, canvas units.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale → double
Scale relative to the contain-fit size.
final

Methods

copyWith({double? scale, Offset? offset}) → MediaPlacement
Returns a copy with the given values replaced.
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.
override