SuravImage constructor

const SuravImage({
  1. Key? key,
  2. required String url,
  3. double width = 200,
  4. double height = 200,
  5. Alignment alignment = Alignment.center,
  6. Map<String, String>? httpHeaders,
  7. ImageWidgetBuilder? imageBuilder,
  8. PlaceholderWidgetBuilder? placeholder,
  9. ProgressIndicatorBuilder? progressIndicatorBuilder,
  10. LoadingErrorWidgetBuilder? errorWidget,
  11. Duration? fadeOutDuration = const Duration(milliseconds: 1000),
  12. Curve fadeOutCurve = Curves.easeOut,
  13. Duration fadeInDuration = const Duration(milliseconds: 500),
  14. Curve fadeInCurve = Curves.easeIn,
  15. BoxFit? fit,
  16. ImageRepeat repeat = ImageRepeat.noRepeat,
  17. bool matchTextDirection = false,
  18. bool useOldImageOnUrlChange = false,
  19. Color? color,
  20. FilterQuality filterQuality = FilterQuality.low,
  21. BlendMode? colorBlendMode,
  22. Duration? placeholderFadeInDuration,
  23. int? memCacheWidth,
  24. int? memCacheHeight,
  25. String? cacheKey,
  26. int? maxWidthDiskCache,
  27. int? maxHeightDiskCache,
  28. ValueChanged<Object>? errorListener,
})

Implementation

const SuravImage({
  super.key,
  required this.url,
  this.width = 200,
  this.height = 200,
  this.alignment = Alignment.center,
  this.httpHeaders,
  this.imageBuilder,
  this.placeholder,
  this.progressIndicatorBuilder,
  this.errorWidget,
  this.fadeOutDuration = const Duration(milliseconds: 1000),
  this.fadeOutCurve = Curves.easeOut,
  this.fadeInDuration = const Duration(milliseconds: 500),
  this.fadeInCurve = Curves.easeIn,
  this.fit,
  this.repeat = ImageRepeat.noRepeat,
  this.matchTextDirection = false,
  this.useOldImageOnUrlChange = false,
  this.color,
  this.filterQuality = FilterQuality.low,
  this.colorBlendMode,
  this.placeholderFadeInDuration,
  this.memCacheWidth,
  this.memCacheHeight,
  this.cacheKey,
  this.maxWidthDiskCache,
  this.maxHeightDiskCache,
  this.errorListener,
});