BlurHash class
- Available extensions
Constructors
-
BlurHash.components(List<
List< components)ColorTriplet> > - Construct a BlurHash object from decoded components. This is useful for e.g. transposing a BlurHash.
- BlurHash.decode(String blurHash, {double punch = 1.0})
-
Decode a BlurHash String to a BlurHash object.
factory
- BlurHash.encode(Image image, {int numCompX = 4, int numCompY = 3})
-
Encodes an image to a BlurHash string.
factory
- BlurHash.fromRgb(int red, int green, int blue)
-
Construct a BlurHash with a single color.
factory
Properties
- averageLinearRgb → ColorTriplet
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns the average linear RGB.no setter -
components
→ List<
List< ColorTriplet> > -
The decoded components of the BlurHash.
This is mostly useful for e.g. transposing a BlurHash.
final
- hash → String
-
The actual BlurHash string.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBottomEdgeDark → bool
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the bottom edge is considered dark. See BlurHashExtensions.isDarkAtY to set a custom threshold.no setter - isBottomLeftCornerDark → bool
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the bottom-left corner is considered dark. See BlurHashExtensions.isDarkAtPos to set a custom threshold.no setter - isBottomRightCornerDark → bool
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the bottom-right corner is considered dark. See BlurHashExtensions.isDarkAtPos to set a custom threshold.no setter - isDark → bool
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the average brightness is considered dark. See BlurHashExtensions.isAverageDark to set a custom threshold.no setter - isLeftEdgeDark → bool
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the left edge is considered dark. See BlurHashExtensions.isDarkAtX to set a custom threshold.no setter - isRightEdgeDark → bool
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the right edge is considered dark. See BlurHashExtensions.isDarkAtX to set a custom threshold.no setter - isTopEdgeDark → bool
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the top edge is considered dark. See BlurHashExtensions.isDarkAtY to set a custom threshold.no setter - isTopLeftCornerDark → bool
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the top-left corner is considered dark. See BlurHashExtensions.isDarkAtPos to set a custom threshold.no setter - isTopRightCornerDark → bool
-
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the top-right corner is considered dark. See BlurHashExtensions.isDarkAtPos to set a custom threshold.no setter - mirroredHorizontally → BlurHash
-
Available on BlurHash, provided by the BlurHashExtensions extension
Mirrors the BlurHash horizontally.no setter - mirroredVertically → BlurHash
-
Available on BlurHash, provided by the BlurHashExtensions extension
Mirrors the BlurHash vertically.no setter - numCompX → int
-
The number of horizontal BlurHash components.
final
- numCompY → int
-
The number of vertical BlurHash components.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transposed → BlurHash
-
Available on BlurHash, provided by the BlurHashExtensions extension
Transposes the BlurHash.no setter
Methods
-
isAverageDark(
{double? threshold}) → bool -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the average brightness is considered dark. -
isColorDark(
ColorTriplet color, {double threshold = 0.3}) → bool -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the given color is considered dark. The color must be given as a linear RGB color. -
isDarkAtPos(
double x, double y, {double? threshold}) → bool -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the given point is considered dark. -
isDarkAtX(
double x, {double? threshold}) → bool -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the given row is considered dark. -
isDarkAtY(
double y, {double? threshold}) → bool -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the given row is considered dark. -
isRectDark(
Point< double> topLeftCorner, Point<double> bottomRightCorner, {double? threshold}) → bool -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns whether the given rectangular region is considered dark. -
linearRgbAt(
double x, double y) → ColorTriplet -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns linear RGB for a point. -
linearRgbAtX(
double x) → ColorTriplet -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns linear RGB for the given column. -
linearRgbAtY(
double y) → ColorTriplet -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns linear RGB for the given row. -
linearRgbInRect(
Point< double> topLeftCorner, Point<double> bottomRightCorner) → ColorTriplet -
Available on BlurHash, provided by the BlurHashExtensions extension
Returns linear RGB for a rectangular region. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toImage(
int width, int height) → Image -
Returns the actual BlurHash image with the given
widthandheight. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited