OptimizedImage.asset constructor

OptimizedImage.asset(
  1. String path, {
  2. Key? key,
  3. double? width,
  4. double? height,
  5. BoxFit fit = BoxFit.cover,
  6. int? maxWidth,
  7. int? maxHeight,
  8. Widget? placeholder,
  9. Widget? errorWidget,
})

Implementation

factory OptimizedImage.asset(
  String path, {
  Key? key,
  double? width,
  double? height,
  BoxFit fit = BoxFit.cover,
  int? maxWidth,
  int? maxHeight,
  Widget? placeholder,
  Widget? errorWidget,
}) =>
    OptimizedImage(
      key: key,
      assetPath: path,
      width: width,
      height: height,
      fit: fit,
      maxWidth: maxWidth,
      maxHeight: maxHeight,
      placeholder: placeholder,
      errorWidget: errorWidget,
    );