Resize class abstract

Class Resize

Implementers

Constructors

Resize({Dimensions? dimensions, bool? relative, bool? regionRelative})

Properties

actionType String
getter/setter pair
dimensions Dimensions
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
regionRelative bool?
getter/setter pair
relative bool?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

aspectRatio(dynamic aspectRatio) Resize
Sets the aspect ratio Receives dynamic returns this object Resize
height(dynamic height) Resize
Sets the height Receives dynamic returns this object Resize
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
params() List<Param?>
toString() String
A string representation of this object.
override
width(dynamic width) Resize
Sets the width Receives dynamic returns this object Resize

Operators

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

Static Methods

crop() Crop
Extracts a region of the given width and height out of the original image.
fill() Fill
Creates an asset with the exact given width and height without distorting the asset.
fit() Fit
The image is resized so that it takes up as much space as possible within a bounding box defined by the given width and height qualifiers. The original aspect ratio is retained and all of the original image is visible.
limitFill() LimitFill
Creates an asset with the exact given width and height without distorting the asset, but only if the original asset is larger than the specified resolution limits.
limitFit() LimitFit
Same as the Scale::fit mode but only if the original image is larger than the given limit (width and height), in which case the image is scaled down so that it takes up as much space as possible within a bounding box defined by the given width and height qualifiers. The original aspect ratio is retained and all of the original image is visible.
limitPad() LimitPad
Same as the Pad mode but only if the original image is larger than the given limit (width and height), in which case the image is scaled down to fill the given width and height while retaining the original aspect ratio and with all of the original image visible.
minimumFit() MinimumFit
Same as the Scale::fit mode but only if the original image is smaller than the given minimum (width and height), in which case the image is scaled up so that it takes up as much space as possible within a bounding box defined by the given width and height qualifiers. The original aspect ratio is retained and all of the original image is visible.
minimumPad() MinimumPad
Same as the Pad mode but only if the original image is smaller than the given minimum (width and height), in which case the image is scaled up to fill the given width and height while retaining the original aspect ratio and with all of the original image visible.
pad() Pad
  • Resizes the image to fill the given width and height while retaining the original aspect ratio and with all of the original image visible.
  • scale() Scale
    Change the size of the image exactly to the given width and height without necessarily retaining the original aspect ratio: all original image parts are visible but might be stretched or shrunk.
    thumbnail() Thumbnail
    The thumb cropping mode is specifically used for creating image thumbnails from either face or custom coordinates, and must always be accompanied by the gravity qualifier set to one of the face detection or custom values.