buildHeader method
Implementation
Widget buildHeader(context) {
String? anim = AppAnim.success;
switch (options.type) {
case QuickAlertType.success:
anim = AppAnim.success;
break;
case QuickAlertType.error:
anim = AppAnim.error;
break;
case QuickAlertType.warning:
anim = AppAnim.warning;
break;
case QuickAlertType.confirm:
anim = AppAnim.confirm;
break;
case QuickAlertType.info:
anim = AppAnim.info;
break;
case QuickAlertType.loading:
anim = AppAnim.loading;
break;
default:
anim = AppAnim.info;
break;
}
if (options.customAsset != null) {
anim = options.customAsset;
}
return Container(
width: double.infinity,
height: 150,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: options.headerBackgroundColor,
),
child: Image.asset(
anim ?? "",
fit: BoxFit.cover,
),
);
}