showStudentProfilePhoto function
void
showStudentProfilePhoto(
{ - required String photoPath,
})
Implementation
void showStudentProfilePhoto({required String photoPath}) {
Get.defaultDialog(
title: StringConst.EMPTY,
backgroundColor: Colors.transparent,
content: ClipRRect(
borderRadius: BorderRadius.circular(NumberConst.DEFAULT_BORDER_CIRCULAR_RADIUS),
child: Image.network(
photoPath,
width: 350,
height: 350,
filterQuality: FilterQuality.high,
fit: BoxFit.cover,
loadingBuilder: (context, child, loadingProgress) {
if (loadingProgress == null) return child;
return Container(
width: 90,
height: 90,
color: AppColors.grey200Color,
child: CircularProgressIndicator(color: Colors.pinkAccent),
);
},
errorBuilder: (context, error, stackTrace) {
return Image.asset(
"assets/images/ic_avatar.png",
fit: BoxFit.contain,
filterQuality: FilterQuality.high,
);
},
),
),
);
}