getBannerIP function
Implementation
getBannerIP(String bannerPath, {Uint8List? bannerByte, double? width, double? height}) {
try {
if (bannerByte!=null) {
return MemoryImage(bannerByte);
}
if( bannerPath.isNotEmpty) {
bool link = isUrl(bannerPath);
if (link) {
return CachedNetworkImageProvider(bannerPath);
}
bool base64 = isBase64(bannerPath);
if (base64) {
return MemoryImage(base64Decode(bannerPath));
}
}
} catch (ex, trace) {
DialogView.showToast('msg_TraitementImpossible'.tr);
logError(ex, trace: trace, position: 'openFileImageExplorer');
}
return Image.asset(ImageIconResources.placeholder, width: width, height: height, fit: BoxFit.cover);
}