buildConnerNetworkImage function

Widget buildConnerNetworkImage({
  1. LoadStateChanged? loadStateChanged,
  2. bool enableLoadState = false,
  3. bool cache = true,
  4. bool enableMemoryCache = true,
  5. bool clearMemoryCacheIfFailed = true,
  6. required String url,
  7. double width = double.infinity,
  8. double height = double.infinity,
  9. bool isCircle = false,
  10. double radius = 5,
  11. BoxFit fit = BoxFit.fill,
})

圆角图片

Implementation

Widget buildConnerNetworkImage({LoadStateChanged? loadStateChanged,
  bool enableLoadState = false,
  bool cache = true,
  bool enableMemoryCache = true,
  bool clearMemoryCacheIfFailed = true,
  required String url,
  double width = double.infinity,
  double height = double.infinity,
  bool isCircle = false,
  double radius = 5,
  BoxFit fit = BoxFit.fill
}){
  return ExtendedImage(
    image: ExtendedNetworkImageProvider(
      url,
      cache: cache,
    ),
    width: getWidth(width),
    height: getHeight(height),
    shape: isCircle? BoxShape.circle : BoxShape.rectangle,
    borderRadius: BorderRadius.all(Radius.circular(radius)),
    enableMemoryCache: enableMemoryCache,
    clearMemoryCacheIfFailed: clearMemoryCacheIfFailed,
    enableLoadState: enableLoadState,
    loadStateChanged: loadStateChanged,
    fit: fit,
  );
}