toImageWidget method
Implementation
Widget toImageWidget({double? height, double? width, int turns = 0}) {
if (path.isEmpty) {
throw Exception('Image path cannot be empty');
}
return RotatedBox(
quarterTurns: turns,
child: kIsWeb
? Image.network(
path,
height: height,
width: width,
)
: Image.file(
File(path),
width: width,
height: height,
fit: BoxFit.fill,
),
);
}