Skip to content

Instantly share code, notes, and snippets.

@manhduydl
manhduydl / show_alert_dialog.dart
Created May 5, 2025 14:24 — forked from bizz84/show_alert_dialog.dart
Helper function for showing an adaptive alert dialog (Material, Cupertino)
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
/// Helper function for showing an adaptive alert dialog
/// Returns:
/// - true if the default action was selected
/// - false if the cancel action was selected
/// - null if the dialog was dismissed
Future<bool?> showAlertDialog({
required BuildContext context,