show static method

void show(
  1. BuildContext context, {
  2. String message = "Please wait...",
})

Implementation

static void show(BuildContext context, {String message = "Please wait..."}) {
  showDialog(
    context: context,
    barrierDismissible: false,
    builder: (context) {
      // Note: StatefulBuilder is removed here unless you plan to update the message mid-flight.
      return AlertDialog(
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(16),
        ),
        content: Row(
          children: [
            const SizedBox(
              width: 28,
              height: 28,
              child: CircularProgressIndicator(strokeWidth: 3),
            ),
            const SizedBox(width: 20),
            Expanded(
              child: Text(
                message,
                style: const TextStyle(
                  fontSize: 16,
                  fontWeight: FontWeight.w500,
                ),
              ),
            ),
          ],
        ),
      );
    },
  );
}