showGrockSnackBarWithIcon method

void showGrockSnackBarWithIcon(
  1. String message, {
  2. Duration? duration,
  3. required IconData icon,
})

showSnackBar method

Implementation

void showGrockSnackBarWithIcon(
  String message, {
  Duration? duration,
  required IconData icon,
}) {
  ScaffoldMessenger.of(context).showSnackBar(
    SnackBar(
      content: Row(
        children: [
          Icon(icon),
          SizedBox(width: 10),
          Text(message),
        ],
      ),
      duration: duration ?? const Duration(seconds: 2),
    ),
  );
}