Fixed several issues with the confirmDismiss handling on the LeaveBehindItem demo. (#33080)

diff --git a/examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart b/examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart
index 4756cdf..15763eb 100644
--- a/examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart
+++ b/examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart
@@ -230,20 +230,16 @@
         confirmDismiss: !confirmDismiss ? null : (DismissDirection dismissDirection) async {
           switch(dismissDirection) {
             case DismissDirection.endToStart:
-              if (await _showConfirmationDialog(context, 'archive'))
-                _handleArchive();
-              break;
+              return await _showConfirmationDialog(context, 'archive') == true;
             case DismissDirection.startToEnd:
-              if (await _showConfirmationDialog(context, 'delete'))
-                _handleDelete();
-              break;
+              return await _showConfirmationDialog(context, 'delete') == true;
             case DismissDirection.horizontal:
             case DismissDirection.vertical:
             case DismissDirection.up:
             case DismissDirection.down:
               assert(false);
           }
-          return true;
+          return false;
         },
         background: Container(
           color: theme.primaryColor,