showInfoDialog function

Future<void> showInfoDialog(
  1. BuildContext context, {
  2. String? message,
  3. Color? barrierColor = Colors.black54,
  4. required AppTheme theme,
  5. void onRateAppPressed()?,
  6. void onShareAppPressed()?,
  7. void onSendFeedbackPressed()?,
})

Shows an informational dialog.

message is the displayed message. theme controls dialog theming. Optional callbacks are for actions like rating or sharing the app.

Implementation

Future<void> showInfoDialog(
  BuildContext context, {
  String? message,
  Color? barrierColor = Colors.black54,
  required AppTheme theme,
  void Function()? onRateAppPressed,
  void Function()? onShareAppPressed,
  void Function()? onSendFeedbackPressed,
}) {
  return showDialogWithAnimation<void>(
    barrierColor: barrierColor,
    context: context,
    child: InfoDialog(
      theme: theme,
      message: message,
      onRateAppPressed: onRateAppPressed ?? NavigatorUtils.openPlayStore,
      onShareAppPressed: onShareAppPressed ?? NavigatorUtils.shareApp,
      onSendFeedbackPressed: onSendFeedbackPressed ?? NavigatorUtils.sendEmailFeedback,
    ),
  );
}