yesNoTransition method Null safety

Future<Object> yesNoTransition(
  1. {required BuildContext context,
  2. required String title,
  3. required String subTitle,
  4. required String message,
  5. String? cancelLabel,
  6. String? confirmLabel,
  7. IconData? icon,
  8. Color? iconColor}
)

Implementation

Future<Object> yesNoTransition({
  required BuildContext context,
  required String title,
  required String subTitle,
  required String message,
  String? cancelLabel,
  String? confirmLabel,
  IconData? icon,
  Color? iconColor,
}) async {
  return await Navigator.push(
    context,
    FadeRoute(
      page: YesNoModal(
        backgroundColour: Theme.of(context).backgroundColor,
        title: title,
        subtitle: subTitle,
        message: message,
        icon: icon,
        iconColour: iconColor,
        confirmLabel: confirmLabel,
        cancelLabel: cancelLabel,
      ),
    ),
  );
}