shareFlightCardInvitationPdf static method

dynamic shareFlightCardInvitationPdf({
  1. required BuildContext context,
  2. required OfferModel? offer,
  3. Estimate? estimate,
})

Implementation

static shareFlightCardInvitationPdf({
  required BuildContext context,
  required OfferModel? offer,
  Estimate? estimate,
}) {
  final authController = Get.find<AuthenticationController>();
  generatePdf(
    context: context,
    widget: SizedBox(
      width: 300,
      child: FlightsInvitationCardBody(
        offer: offer,
        estimate: estimate,
        isGenerating: true,
      ),
    ),
    url: authController.referralUrl,
    refCode: authController.referralCode ?? '',
    customSize: Size(
      450,
      ((offer?.isRoundTrip ?? false) ? 820 : 775),
    ),
    showLoading: true,
  );
}