show_snackbar_notification function

void show_snackbar_notification(
  1. BuildContext context,
  2. String notification,
  3. String snackbar_action,
  4. VoidCallback onPressed,
)

Implementation

void show_snackbar_notification(BuildContext context, String notification,
    String snackbar_action, VoidCallback onPressed) {
  final snackBar = SnackBar(
    content: Text(notification),
    action: SnackBarAction(
      label: snackbar_action,
      onPressed: () {
        onPressed();
      },
    ),
  );
  ScaffoldMessenger.of(context).showSnackBar(snackBar);
}