TF-3758 Update app grid in left menu on mobile

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-05-29 20:25:14 +07:00
committed by Dat H. Pham
parent d7c4418674
commit 6b09fb9faf
12 changed files with 230 additions and 120 deletions
@@ -37,12 +37,7 @@ mixin ImageLoaderMixin {
},
errorBuilder: (context, error, stackTrace) {
logError('ImageLoaderMixin::buildImage:Exception = $error');
return Container(
width: imageSize ?? 150,
height: imageSize ?? 150,
alignment: Alignment.center,
child: const Icon(Icons.error_outline),
);
return buildNoImage(imageSize ?? 150);
},
);
} else if (isImageSVG(imagePath)) {
@@ -61,6 +56,15 @@ mixin ImageLoaderMixin {
}
}
Widget buildNoImage(double imageSize) {
return Container(
width: imageSize,
height: imageSize,
alignment: Alignment.center,
child: const Icon(Icons.error_outline),
);
}
bool isImageNetworkLink(String imagePath) {
return imagePath.startsWith('http') == true ||
imagePath.startsWith('https') == true;