loadAssetImage static method

Widget loadAssetImage(
  1. String? image, {
  2. double? width,
  3. double? height,
  4. int? cacheWidth,
  5. int? cacheHeight,
  6. BoxFit? fit,
  7. String format = 'png',
  8. Color? color,
})

加载网络图片widget

Implementation

static Widget loadAssetImage(
  String? image, {
  double? width,
  double? height,
  int? cacheWidth,
  int? cacheHeight,
  BoxFit? fit,
  String format = 'png',
  Color? color,
}) {
  return Image.asset(
    ImageUtils.getImgPath(image, format: format),
    height: height,
    width: width,
    cacheWidth: cacheWidth,
    cacheHeight: cacheHeight,
    fit: fit,
    color: color,

    /// 忽略图片语义
    excludeFromSemantics: true,
  );
}