msg<T> function
Implementation
void msg<T>(BuildContext context, String msg) {
return CherryToast(
icon: Icons.error_outline,
iconColor: Colors.black,
themeColor: Colors.black,
backgroundColor: Colors.red.shade50,
shadowColor: Colors.black26,
borderRadius: 16.0,
description: Text(
msg,
style: const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
toastPosition: Position.bottom,
animationDuration: const Duration(milliseconds: 1000),
animationCurve: Curves.easeOutCubic,
autoDismiss: true,
displayCloseButton: true,
title: Text(
'Error',
style: TextStyle(color: Colors.red.shade900, fontWeight: FontWeight.bold),
),
).show(context);
}