loadFileAsImage function
Implementation
Widget loadFileAsImage(String path, {double? height, double? width, BoxFit? fit, Color? color}) {
return Image.file(
File(path),
height: height ?? 24,
width: width ?? 24,
fit: fit ?? BoxFit.cover,
color: color,
errorBuilder: (_, __, ___) => Placeholder(fallbackHeight: height ?? 24, fallbackWidth: width ?? 24),
);
}