onAssetImage function

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

Implementation

Widget onAssetImage({
  required String imagePath, double size = 24, double? width,
  double? height, BoxFit fit = BoxFit.contain,}) {
  return Image.asset(imagePath, width: width ?? size,
    height: height ?? size, fit: fit,);
}