showInfoDialog static method

void showInfoDialog(
  1. BuildContext context, {
  2. String? message,
  3. Widget? widget,
})

Implementation

static void showInfoDialog(
  BuildContext context, {
  String? message,
  Widget? widget,
}) {
  showDialog(
    context: context,
    builder: (context) {
      return AlertDialog(
        content: (widget != null) ? widget : Text(message!),
        actions: [
          TextButton(
            onPressed: () => Navigator.pop(context),
            child: const Text('Ok'),
          ),
        ],
      );
    },
  );
}