DeleteSnackBar constructor

DeleteSnackBar({
  1. Key? key,
  2. required String message,
  3. required VoidCallback onUndo,
})

Implementation

DeleteSnackBar({
  super.key,
  required String message,
  required VoidCallback onUndo,
}) : super(
        content: Text(
          'Deleted $message',
          maxLines: 1,
          overflow: TextOverflow.ellipsis,
        ),
        duration: Duration(seconds: 2),
        action: SnackBarAction(
          label: 'Undo',
          onPressed: onUndo,
        ),
      );