diff --git a/lib/modules/cx_module/chat/view_all_attachment_page.dart b/lib/modules/cx_module/chat/view_all_attachment_page.dart index 8eb13b7d..b3990a62 100644 --- a/lib/modules/cx_module/chat/view_all_attachment_page.dart +++ b/lib/modules/cx_module/chat/view_all_attachment_page.dart @@ -103,6 +103,8 @@ class AttachmentFileViewer extends StatelessWidget { bool isLoading = snapshot.connectionState == ConnectionState.waiting; + print("snapshot.data!:${snapshot.data}"); + Widget widget; if (isLoading) { if (isAudio) { @@ -122,7 +124,10 @@ class AttachmentFileViewer extends StatelessWidget { widget = const SizedBox(width: 24, height: 24, child: CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 2)); } else { if (isImage) { - widget = Image.file(snapshot.data!, width: 48, height: 48, fit: BoxFit.contain); + widget = Image.file(snapshot.data!, width: 48, height: 48, fit: BoxFit.contain, + errorBuilder: (context, error, stackTrace) { + return const Icon(Icons.broken_image, size: 48); + },); } else { widget = Image.asset( "assets/images/${isPdf ? "pdf" : isExcel ? "excel" : "doc"}.png",