BlurHash constructor

const BlurHash({
  1. required String hash,
  2. Key? key,
  3. Color color = Colors.blueGrey,
  4. BoxFit imageFit = BoxFit.fill,
  5. int decodingWidth = _DEFAULT_SIZE,
  6. int decodingHeight = _DEFAULT_SIZE,
  7. String? image,
  8. VoidCallback? onDecoded,
  9. VoidCallback? onDisplayed,
  10. VoidCallback? onReady,
  11. VoidCallback? onStarted,
  12. Duration duration = const Duration(milliseconds: 1000),
  13. Map<String, String> httpHeaders = const {},
  14. Curve curve = Curves.easeOut,
  15. ImageErrorWidgetBuilder? errorBuilder,
})

Implementation

const BlurHash({
  required this.hash,
  Key? key,
  this.color = Colors.blueGrey,
  this.imageFit = BoxFit.fill,
  this.decodingWidth = _DEFAULT_SIZE,
  this.decodingHeight = _DEFAULT_SIZE,
  this.image,
  this.onDecoded,
  this.onDisplayed,
  this.onReady,
  this.onStarted,
  this.duration = const Duration(milliseconds: 1000),
  this.httpHeaders = const {},
  this.curve = Curves.easeOut,
  this.errorBuilder,
})  : assert(decodingWidth > 0),
      assert(decodingHeight != 0),
      super(key: key);