launchInformDialog function

Future<void> launchInformDialog(
  1. BuildContext context,
  2. {required Widget message,
  3. Icon? icon,
  4. required String title,
  5. void onExit(
      )?}
    )

    Implementation

    @pragma("vm:prefer-inline")
    Future<void> launchInformDialog(BuildContext context,
            {required Widget message,
            Icon? icon,
            required String title,
            void Function()? onExit}) async =>
        await showDialog(
            context: context,
            builder: (BuildContext context) => AlertDialog(
                    icon: icon ?? const Icon(Icons.info_outline_rounded),
                    title: Text(title),
                    content: message,
                    actions: <Widget>[
                      TextButton.icon(
                          icon: const Icon(Icons.thumb_up_rounded),
                          label: const Text("OK"),
                          onPressed: () {
                            onExit?.call();
                            Navigator.of(context).pop();
                          }),
                    ]));