SuccessSnackBar constructor
SuccessSnackBar({
- Key? key,
- required String message,
- required BuildContext context,
Take in parameter the message and the context
Implementation
SuccessSnackBar(
{super.key, required this.message, required BuildContext context})
: super(
behavior: SnackBarBehavior.floating,
duration: const Duration(seconds: 2),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
backgroundColor: AppColors.green400,
shape: RoundedRectangleBorder(
side: const BorderSide(color: AppColors.green500, width: 2),
borderRadius: BorderRadius.circular(64),
),
content: Row(children: [
Container(
height: 48,
width: 48,
decoration: const BoxDecoration(
color: AppColors.green600,
shape: BoxShape.circle,
),
child: const Icon(BootstrapIcons.check,
color: Colors.white, size: 30),
),
const SizedBox(width: 16),
Text(message,
style: const TextStyle(
fontFamily: 'Poppins',
fontSize: 14,
fontWeight: FontWeight.bold)),
]),
);