ThumbSize class final

A requested thumbnail size, in pixels.

The value equality below is not a convenience. Slice 3's PickerAssetKey hashes over a ThumbSize, and that key's equality is what stops the grid decoding one copy of every thumbnail per cell (spec §4.4).

Annotations

Constructors

ThumbSize(int width, int height)
Creates a thumbnail size. Both arguments are positional, per contract §1.
const
ThumbSize.square(int edge)
A square thumbnail of edge pixels a side.
const

Properties

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

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, int>
The wire form. Keys are exactly width and height.
toString() → String
A string representation of this object.
override

Operators

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