onNetworkImage function

Widget onNetworkImage({
  1. required String imagePath,
  2. double size = 24,
  3. double? width,
  4. double? height,
  5. BoxFit fit = BoxFit.cover,
})

Implementation

Widget onNetworkImage({required String imagePath,
  double size = 24, double? width, double? height,
  BoxFit fit = BoxFit.cover,}) {
  return Image.network(
    imagePath,
    width: width ?? size,
    height: height ?? size,
    fit: fit,
  );
}