toMap method

Map<String, dynamic> toMap()

Converts the style to a map for MethodChannel communication.

Implementation

Map<String, dynamic> toMap() {
  return {
    'logoBytes': logoBytes,
    'backgroundColor': backgroundColor,
    'paymentOptionHeadingText': paymentOptionHeadingText,
    'paymentOptionHeadingForeground': paymentOptionHeadingForeground,
    'iosPaymentOptionHeadingFont': iosPaymentOptionHeadingFont,
    'iosPaymentOptionHeadingFontSize': iosPaymentOptionHeadingFontSize,
    'paymentOptionText': paymentOptionText,
    'paymentOptionForeground': paymentOptionForeground,
    'paymentOptionBackground': paymentOptionBackground,
    'iosPaymentOptionBorderColor': iosPaymentOptionBorderColor,
    'iosPaymentOptionFont': iosPaymentOptionFont,
    'iosPaymentOptionFontSize': iosPaymentOptionFontSize,
    'payableAreaBackground': payableAreaBackground,
    'payableAmountText': payableAmountText,
    'payableAmountForeground': payableAmountForeground,
    'iosPayableAmountFont': iosPayableAmountFont,
    'iosPayableAmountFontSize': iosPayableAmountFontSize,
    'footerText': footerText,
    'footerForeground': footerForeground,
    'iosFooterFont': iosFooterFont,
    'iosFooterFontSize': iosFooterFontSize,
    'addNewCardText': addNewCardText,
    'addNewCardForeground': addNewCardForeground,
    'iosAddNewCardFont': iosAddNewCardFont,
    'iosAddNewCardFontSize': iosAddNewCardFontSize,
    'payNowButtonBackground': payNowButtonBackground,
    'payNowButtonForeground': payNowButtonForeground,
    'payNowButtonText': payNowButtonText,
    'iosPayNowButtonFont': iosPayNowButtonFont,
    'iosPayNowButtonFontSize': iosPayNowButtonFontSize,
    'iosPayNowButtonRadius': iosPayNowButtonRadius,
    'iosYesButtonForeground': iosYesButtonForeground,
    'iosYesButtonBackground': iosYesButtonBackground,
    'iosYesButtonFont': iosYesButtonFont,
    'iosYesButtonFontSize': iosYesButtonFontSize,
    'iosYesButtonRadius': iosYesButtonRadius,
    'iosYesButtonBorderColor': iosYesButtonBorderColor,
    'iosNoButtonForeground': iosNoButtonForeground,
    'iosNoButtonBackground': iosNoButtonBackground,
    'iosNoButtonFont': iosNoButtonFont,
    'iosNoButtonFontSize': iosNoButtonFontSize,
    'iosNoButtonRadius': iosNoButtonRadius,
    'iosNoButtonBorderColor': iosNoButtonBorderColor,
  }..removeWhere((key, value) => value == null);
}