UniversalImage constructor

const UniversalImage(
  1. dynamic imageSource, {
  2. Key? key,
  3. double scale = 1.0,
  4. ImageFrameBuilder? frameBuilder,
  5. ImageErrorWidgetBuilder? errorBuilder,
  6. String? semanticLabel,
  7. bool excludeFromSemantics = false,
  8. double? width,
  9. double? height,
  10. Color? color,
  11. BlendMode? colorBlendMode,
  12. BoxFit? fit,
  13. Alignment alignment = Alignment.center,
  14. ImageRepeat repeat = ImageRepeat.noRepeat,
  15. Rect? centerSlice,
  16. bool matchTextDirection = false,
  17. bool gaplessPlayback = false,
  18. bool isAntiAlias = false,
  19. FilterQuality filterQuality = FilterQuality.low,
  20. int? cacheWidth,
  21. int? cacheHeight,
  22. bool allowDrawingOutsideViewBox = false,
  23. bool svgSkiaMode = false,
  24. double? size,
  25. TextDirection? textDirection,
  26. Widget? placeholder,
  27. Widget? errorPlaceholder,
  28. bool cache = true,
  29. bool clearMemoryCacheIfFailed = true,
  30. bool clearMemoryCacheWhenDispose = false,
  31. String assetPrefix = 'assets',
  32. double? compressionRatio,
  33. int? maxBytes,
  34. ImageEngine imageEngine = ImageEngine.extendedImage,
  35. Object? heroTag,
  36. ColorFilter? colorFilter,
  37. LoadStateChanged? loadStateChanged,
})

Create image widet base on uri

Implementation

const UniversalImage(
  this.imageSource, {
  Key? key,
  this.scale = 1.0,
  this.frameBuilder,
  this.errorBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.width,
  this.height,
  this.color,
  this.colorBlendMode,
  this.fit,
  this.alignment = Alignment.center,
  this.repeat = ImageRepeat.noRepeat,
  this.centerSlice,
  this.matchTextDirection = false,
  this.gaplessPlayback = false,
  this.isAntiAlias = false,
  this.filterQuality = FilterQuality.low,
  this.cacheWidth,
  this.cacheHeight,
  this.allowDrawingOutsideViewBox = false,
  this.svgSkiaMode = false,
  this.size,
  this.textDirection,
  this.placeholder,
  this.errorPlaceholder,
  this.cache = true,
  this.clearMemoryCacheIfFailed = true,
  this.clearMemoryCacheWhenDispose = false,
  this.assetPrefix = 'assets',
  this.compressionRatio,
  this.maxBytes,
  this.imageEngine = ImageEngine.extendedImage,
  this.heroTag,
  this.colorFilter,
  this.loadStateChanged,
})  : assert(imageSource is String ||
          imageSource is IconData ||
          imageSource is Uint8List),
      super(key: key);