olo_pay_sdk library

This is the main library for the Olo Pay SDK and contains all classes, enums, and data types used by the SDK. The main entry point for working with the SDK is the OloPaySdk class.

To use this library in your code, import it as follows

import 'package:olo_pay_sdk/olo_pay_sdk.dart';

For convenience in working with the documentation, additional sub-libraries are provided that break out the classes into the following categories:

Classes

Address
Represents an address
ApplePayButtonConfiguration
Parameters for configuring a DigitalWalletButton for use with Apple Pay
ApplePayConfiguration
Parameters for initializing Apple Pay
BackgroundStyles
Defines background and border styles for widgets in the SDK
CardDetailsFormTextField
Widget responsible for displaying a credit card input form
CardDetailsFormTextFieldController
CardDetailsSingleLineTextField
Widget responsible for displaying a credit card input field
CardDetailsSingleLineTextFieldController
A controller for CardDetailsSingleLineTextField
CardFieldState
Class representing the state of a CardField
CustomErrorMessages
Defines custom error messages for the widget
CustomFieldErrors
Defines custom error messages for different field error types
CvvTextField
Widget responsible for displaying a CVV input field
CvvTextFieldController
A controller for CvvTextField
CvvUpdateToken
Represents a CVV update token containing all the information needed to submit a baske via Olo's Ordering API
DigitalWalletButton
A button for initiating digital wallet payments.
DigitalWalletConfiguration
Configuration parameters for digital wallets.
DigitalWalletLineItem
Represents a line item in a digital wallet transaction
DigitalWalletPaymentParameters
Parameters used to create a digital wallet payment method
ErrorBackgroundStyles
Defines background and border styles for the CardDetailsFormTextField widget
ErrorCodes
A list of all possible error codes that can be used in conjunction with PlatformException
FieldDividerStyles
Defines form inner divider styles for the CardDetailsFormTextField widget
GooglePayButtonConfiguration
Parameters for configuring a DigitalWalletButton for use with Google Pay
GooglePayConfiguration
Configuration parameters for Google Pay transactions
Hints
Defines the hint text for card input widget fields
OloPaySdk
The main entry point into the Flutter Olo Pay SDK.
PaddingStyles
Defines padding that is applied to a widget
PaymentMethod
Represents a payment method containing all information needed to submit a basket via Olo's Ordering API
TextStyles
Defines text styles for widgets in the SDK

Enums

ApplePayButtonStyle
Enum representing different visual styles available for an Apple Pay button
ApplePayButtonType
Enum representing different types of Apple Pay buttons that can be used
CardField
Enum representing the different fields of a credit card
CardType
Enum representing credit card types
CurrencyCode
Enum representation of supported currency codes
DigitalWalletLineItemStatus
Enum representing the status of a line item
DigitalWalletLineItemType
Enum representing the type of a line item in a digital wallet transaction
GooglePayButtonTheme
Enum representing different visual styles available for a Google Pay button
GooglePayButtonType
Enum representing different types of Google Pay buttons that can be used
GooglePayCheckoutStatus
Enum representing valid checkout option and price status combinations, as defined by Google.
TextFieldAlignment

Typedefs

CardDetailsErrorMessageChanged = void Function(String errorMessage)
Callback signature for when a CardDetailsSingleLineTextField or CardDetailsFormTextField error message changes
CardDetailsFocusChanged = void Function(CardField? focusedField, bool isValid, Map<CardField, CardFieldState> fieldStates)
Callback signature for when a CardDetailsSingleLineTextField's focused state changes
CardDetailsFormTextFieldControllerCreated = void Function(CardDetailsFormTextFieldController controller)
Callback signature for when a CardDetailsFormTextField's controller has been created and is ready to be used
CardDetailsFormValidStateChanged = void Function(bool isValid)
Callback signature for when a CardDetailsFormTextField's valid state changes
CardDetailsInputChanged = void Function(bool isValid, Map<CardField, CardFieldState> fieldStates)
Callback signature for when a CardDetailsSingleLineTextField's state changes due to user-entered input
CardDetailsSingleLineTextFieldControllerCreated = void Function(CardDetailsSingleLineTextFieldController controller)
Callback signature for when a CardDetailsSingleLineTextField's controller has been created and is ready to be used
CardDetailsValidStateChanged = void Function(bool isValid, Map<CardField, CardFieldState> fieldStates)
Callback signature for when a CardDetailsSingleLineTextField's valid state changes
CvvErrorMessageChanged = void Function(String errorMessage)
Callback signature for when a CvvTextField's error message changes
CvvFocusChanged = void Function(CardFieldState fieldStates)
Callback signature for when a CvvTextField's focused state changes
CvvInputChanged = void Function(CardFieldState fieldStates)
Callback signature for when a CvvTextField's state changes due to user-entered input
CvvTextFieldControllerCreated = void Function(CvvTextFieldController controller)
Callback signature for when a CvvTextField's controller has been created and is ready to be used
CvvValidStateChanged = void Function(CardFieldState fieldState)
Callback signature for when a CvvTextField's valid state changes
DigitalWalletReadyChanged = void Function(bool isReady)
Callback signature for when the ready status of digital wallets changes
OnDigitalWalletButtonClicked = void Function()
Callback signature for when a DigitalWalletButton has been clicked