CommonSnackBar.warning constructor

CommonSnackBar.warning({
  1. Key? key,
  2. required BuildContext context,
  3. required String text,
  4. SnackBarAction? action,
})

Implementation

CommonSnackBar.warning({
  super.key,
  required BuildContext context,
  required String text,
  super.action,
}) : super(
       content: Row(
         children: [
           const Icon(Icons.warning_amber, size: 24, color: Colors.orange),
           const SizedBox(width: 8),
           Expanded(
             child: Text(
               text,
               style: context.textTheme.bodyMedium?.copyWith(
                 color: Colors.orange,
               ),
             ),
           ),
         ],
       ),
       backgroundColor: Colors.orange.withValues(alpha: .1),
       margin: const EdgeInsets.only(left: 20, right: 20, bottom: 32),
       padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
       shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
       behavior: SnackBarBehavior.floating,
     );