improvement

main_production_audio_video_call
Sikander Saleem 4 weeks ago
parent 157d8138e3
commit 69fb1917fb

@ -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",

Loading…
Cancel
Save