InfoSnackBar constructor

InfoSnackBar({
  1. Key? key,
  2. required String message,
  3. required BuildContext context,
})

Take in parameter the message and the context

Implementation

InfoSnackBar(
    {super.key, required this.message, required BuildContext context})
    : super(
        behavior: SnackBarBehavior.floating,
        duration: const Duration(minutes: 1),
        padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
        backgroundColor: AppColors.blue600,
        shape: RoundedRectangleBorder(
          side: const BorderSide(color: AppColors.blue700, width: 2),
          borderRadius: BorderRadius.circular(64),
        ),
        content: Row(children: [
          const CircularProgressIndicator(
              color: Colors.white,
              strokeWidth: 3,
              backgroundColor: AppColors.green400),
          const SizedBox(width: 16),
          Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
            Text(message,
                style: const TextStyle(
                    fontSize: 14,
                    fontFamily: 'Poppins',
                    fontWeight: FontWeight.bold)),
          ]),
        ]),
      );