blurHash static method

OctoPlaceholderBuilder blurHash(
  1. String hash, {
  2. BoxFit? fit,
})

Use BlurHash as a placeholder. The hash should be made server side. See blurha.sh for more information. fit defaults to BoxFit.cover.

Implementation

static OctoPlaceholderBuilder blurHash(String hash, {BoxFit? fit}) {
  return (context) => SizedBox.expand(
        child: Image(
          image: BlurHashImage(hash),
          fit: fit ?? BoxFit.cover,
        ),
      );
}