FastCachedImage constructor

const FastCachedImage({
  1. required String url,
  2. Map<String, dynamic>? headers,
  3. double scale = 1.0,
  4. ImageErrorWidgetBuilder? errorBuilder,
  5. String? semanticLabel,
  6. Widget loadingBuilder(
    1. BuildContext,
    2. FastCachedProgressData
    )?,
  7. bool excludeFromSemantics = false,
  8. bool showErrorLog = true,
  9. double? width,
  10. double? height,
  11. Color? color,
  12. Animation<double>? opacity,
  13. BlendMode? colorBlendMode,
  14. BoxFit? fit,
  15. AlignmentGeometry alignment = Alignment.center,
  16. ImageRepeat repeat = ImageRepeat.noRepeat,
  17. Rect? centerSlice,
  18. bool matchTextDirection = false,
  19. bool gaplessPlayback = false,
  20. bool isAntiAlias = false,
  21. FilterQuality filterQuality = FilterQuality.low,
  22. Duration fadeInDuration = const Duration(milliseconds: 500),
  23. int? cacheWidth,
  24. int? cacheHeight,
  25. Key? key,
})

FastCachedImage creates a widget to display network images. This widget downloads the network image when this widget is build for the first time. Later whenever this widget is called the image will be displayed from the downloaded database instead of the network. This can avoid unnecessary downloads and load images much faster.

Implementation

const FastCachedImage(
    {required this.url,
    this.headers,
    this.scale = 1.0,
    this.errorBuilder,
    this.semanticLabel,
    this.loadingBuilder,
    this.excludeFromSemantics = false,
    this.showErrorLog = true,
    this.width,
    this.height,
    this.color,
    this.opacity,
    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.fadeInDuration = const Duration(milliseconds: 500),
    this.cacheWidth,
    this.cacheHeight,
    Key? key})
    : super(key: key);