KoolbaseImageTransform class
Image-transformation options for KoolbaseStorageClient.publicUrl and
KoolbaseObject.publicUrl. Each field maps to one Cloudflare Image
Transformations parameter; unset fields are omitted.
All numeric inputs are clamped silently to Cloudflare-supported ranges
(width/height 1–2000, quality 1–100, dpr 1–3) so a stray width: 99999
can't trigger error 9422 at the edge.
Example:
final url = KoolbaseStorageClient.publicUrl(
projectId: pid, bucket: 'avatars', path: 'user.jpg',
transform: const KoolbaseImageTransform(
width: 400, height: 400,
format: KoolbaseImageFormat.webp,
quality: 80, fit: KoolbaseImageFit.cover,
),
);
Constructors
- KoolbaseImageTransform({int? width, int? height, KoolbaseImageFormat? format, int? quality, KoolbaseImageFit? fit, int? dpr, KoolbaseImageGravity? gravity})
-
const
Properties
- dpr → int?
-
final
- fit → KoolbaseImageFit?
-
final
- format → KoolbaseImageFormat?
-
final
- gravity → KoolbaseImageGravity?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int?
-
final
- isEmpty → bool
-
no setter
- quality → int?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → int?
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCloudflareOptions(
) → String -
Serializes to Cloudflare's comma-separated key=value options segment,
e.g.
width=400,format=webp,quality=80. Returns an empty string when no fields are set — callers can use that to skip the/cdn-cgi/image/prefix entirely. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited