ImageUtils class abstract final

Image helpers: initials, URL detection and aspect-ratio math.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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.
inherited

Static Methods

aspectRatio(double width, double height) → double
The aspect ratio of width / height (1.0 when height is 0).
heightForWidth(double width, double aspectRatio) → double
Height that keeps the given aspectRatio for width.
initials(String? name, {int maxChars = 2, String fallback = '?'}) → String
Builds a short initials string from name (max maxChars characters).
isAssetPath(String value) → bool
Whether value is a local asset path (starts with assets/).
isDataUri(String value) → bool
Whether value is a data: URI.
isNetworkUrl(String value) → bool
Whether value is an http(s) image URL.
widthForHeight(double height, double aspectRatio) → double
Width that keeps the given aspectRatio for height.