Skip to content

Commit 4d2c0f2

Browse files
runnerrunner
runner
authored and
runner
committed
Release 2.0.0
1 parent fb0b7d7 commit 4d2c0f2

File tree

273 files changed

+29656
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+29656
-0
lines changed

.github/workflows/pub_dev_publish.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# DO NOT RUN THIS MANUALLY - THIS GETS RUN AS PART OF A DIFFERENT GH ACTIONS SCRIPT
2+
3+
name: Publish Release to Pub.dev
4+
on:
5+
push:
6+
tags:
7+
- '[0-9]+.[0-9]+.[0-9]+*'
8+
9+
env:
10+
FLUTTER_VERSION: 3.16.1
11+
12+
jobs:
13+
Release-It-To-The-People:
14+
runs-on: macos-13
15+
environment: live_pub_dev
16+
permissions:
17+
id-token: write
18+
contents: read
19+
steps:
20+
- name: "Test Release Check"
21+
id: test-release-check
22+
run: |
23+
if [[ ${{ github.repository_owner }} == *"ololabs-playground"* ]]
24+
then
25+
echo "is-test=true" >> "$GITHUB_OUTPUT"
26+
else
27+
echo "is-test=false" >> "$GITHUB_OUTPUT"
28+
fi
29+
30+
- name: "Checkout Project"
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Flutter
34+
uses: flutter-actions/setup-flutter@v3.6
35+
with:
36+
channel: stable
37+
version: ${{ env.FLUTTER_VERSION }}
38+
39+
- name: "Install Flutter Dependencies"
40+
run: |
41+
flutter pub get
42+
43+
- name: "Publish Dry Run"
44+
if: ${{ steps.test-release-check.outputs.is-test == 'true' }}
45+
run: |
46+
flutter pub publish --dry-run
47+
48+
- name: "Pub.dev Token Authentication"
49+
if: ${{ steps.test-release-check.outputs.is-test == 'false' }}
50+
uses: dart-lang/setup-dart@v1
51+
52+
- name: "Publish Release"
53+
if: ${{ steps.test-release-check.outputs.is-test == 'false' }}
54+
run: flutter pub publish --force
55+

CHANGELOG.md

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
# Olo Pay Flutter SDK Changelog
2+
3+
## v2.0.0 (Apr 8, 2025)
4+
5+
## Overview
6+
- Digital wallets overhaul
7+
- Digital wallets now use a `DigitalWalletConfiguration` object that bundles all information needed to process transactions
8+
- Digital wallet configurations for both Apple Pay and Google Pay can be updated
9+
- New `DigitalWalletButton` class that supports both Apple Pay and Google Pay buttons
10+
- Add support for line items
11+
- Simplified the SDK setup process
12+
- New form widget for entering credit card details.
13+
14+
## Updates
15+
- `OloPaySdk`
16+
- Added `updateDigitalWalletConfiguration()`
17+
- `DigitalWalletPaymentParameters`
18+
- Added `googlePayCheckoutStatus` property
19+
- `ErrorCodes`
20+
- Added `emptyCompanyName` property
21+
- Added `emptyCountryCode` property
22+
- Added `invalidCountryCode` property
23+
- Added `lineItemTotalMismatch` property
24+
- `BackgroundStyles`
25+
- Added `noPadding` property
26+
- Added `formDefaults` property
27+
- `TextStyles`
28+
- Added `formDefaults` property
29+
- Added `defaultErrorFontSize` property
30+
- Added `errorTextSize` property
31+
- Added `errorAssetFont` property
32+
- `Hints`
33+
- Added `formDefaults` property
34+
- Added `formFocusedDefaults` property
35+
- Added `singleLineOnly` constructor
36+
- Added `formOnly` constructor
37+
- Added `formFocusedOnly` constructor
38+
- `DigitalWalletPaymentParameters`
39+
- Added `type` property
40+
- Added `status` property
41+
- `CardDetailsSingleLineTextField`: Added `enabled` property
42+
- `CvvTextField`: Added `enabled` property
43+
- `PaymentMethod`
44+
- Added `digitalWalletCardDescription` property
45+
- Added `email` property
46+
- Added `phoneNumber` property
47+
- Added `fullName` property
48+
- Added `billingAddress` property
49+
- New Classes/Enums
50+
- Introduce the `CardDetailsFormTextField` widget
51+
- Introduce the `DigitalWalletButton`
52+
- Added `CurrencyCode` enum
53+
- Added `DigitalWalletConfiguration`
54+
- Added `GooglePayButtonConfiguration`
55+
- Added `GooglePayButtonTheme`
56+
- Added `GooglePayButtonType`
57+
- Added `ApplePayConfiguration`
58+
- Added `ApplePayButtonConfiguration`
59+
- Added `ApplePayButtonStyle`
60+
- Added `ApplePayButtonType`
61+
- Added `GooglePayCheckoutStatus`
62+
- Added `Address`
63+
- Added `FieldDividerStyles`
64+
- Added `ErrorBackgroundStyles`
65+
- Added `DigitalWalletLineItem`
66+
- Added `DigitalWalletLineItemStatus`
67+
- Added `DigitalWalletLineItemType`
68+
69+
## Breaking Changes
70+
- `OloPaySdk`
71+
- Changed method signature of `initializeOloPay()`
72+
- Removed `changeGooglePayVendor()` in favor of `updateDigitalWalletConfiguration()`
73+
- `onDigitalWalletReady` may now be called multiple times for both Apple Pay and Google Pay (See documentation for details)
74+
- `ApplePaySetupParameters`
75+
- Renamed to `ApplePayConfiguration`
76+
- Moved properties common to Apple Pay and Google Pay into `DigitalWalletConfiguration`
77+
- `GooglePaySetupParameters`
78+
- Renamed to `GooglePayConfiguration`
79+
- Moved properties common to Apple Pay and Google Pay into `DigitalWalletConfiguration`
80+
- `DigitalWalletPaymentParameters`
81+
- Removed `currencyMultiplier` property (See `GooglePayConfiguration`)
82+
- Removed `currencyCode` property (See `GooglePayConfiguration` and `ApplePayConfiguration`)
83+
- Removed `countryCode` property (See `GooglePayConfiguration` and `ApplePayConfiguration`)
84+
- `ErrorCodes`
85+
- Removed previously deprecated `missingParameter` property
86+
- Renamed `googlePayUninitialized` property to `uninitializedDigitalWallet` because it now applies to both Google Pay and Apple Pay
87+
- Renamed `googlePayNotReady` property to `digitalWalletNotReady` because it now applies to both Google Pay and Apple Pay
88+
- `CardDetailsSingleLineTextFieldController`: Removed `setEnabled()` in favor of `CardDetailsSingleLineTextField.enabled` property
89+
- `CvvTextFieldController`: Removed `setEnabled()` in favor of `CvvTextField.enabled` property
90+
- `Hints`
91+
- Renamed `defaults` property to `singleLineDefaults`
92+
- Removed Classes
93+
- `GooglePayVendorParameters` (see `DigitalWalletConfiguration` and `GooglePayConfiguration`)
94+
- `OloPaySetupParameters`
95+
96+
### Dependency Updates
97+
- Native SDKs
98+
- Updated to use [Olo Pay Android SDK v4.1.0](https://github.com/ololabs/olo-pay-android-sdk-releases/releases/tag/4.1.0)
99+
- Updated to use [Olo Pay iOS SDK v5.2.0](https://github.com/ololabs/olo-pay-ios-sdk-releases/releases/tag/5.2.0)
100+
101+
- Android
102+
- Updated to Gradle v8.7
103+
- Updated to compile SDK to 35
104+
- Updated to `com.android.tools.build:gradle:8.6.1`
105+
- Updated to `androidx.constraintlayout:constraintlayout:2.2.0`
106+
- Updated to `androidx.core:core-ktx:1.15.0`
107+
- Updated to `org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0`
108+
109+
## v1.2.0 (Aug 20, 2024)
110+
111+
### Updates
112+
- `CardDetailsSingleLineTextField`: Added ability to set alignment of the built in error message with `errorAlignment`
113+
- `CardDetailsSingleLineTextField`: Changed default `maxHeight` to `45`
114+
- `CardDetailsSingleLineTextField`: Changed default `errorMarginTop` to `8.0`
115+
- Deprecated `ErrorCodes.missingParameter`: All previous usages have changed to `ErrorCodes.InvalidParameter`
116+
- Introduce `CvvTextField` widget for CVV tokenization.
117+
118+
### Dependency Updates
119+
- Native SDKs
120+
- Updated to use [Olo Pay Android SDK v3.1.1](https://github.com/ololabs/olo-pay-android-sdk-releases/releases/tag/3.1.1)
121+
- Updated to use [Olo Pay iOS SDK v4.0.2](https://github.com/ololabs/olo-pay-ios-sdk-releases/releases/tag/4.0.2)
122+
123+
- Android Project
124+
- Updated to Gradle v8.2
125+
- Updated to Java v17
126+
- Updated to `com.android.tools.build:gradle:8.2.2`
127+
- Updated to `androidx.core:core-ktx:1.13.1`
128+
- Updated to `org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1`
129+
- Updated to `com.google.android.material:material:1.12.0`
130+
131+
### Bug Fixes
132+
- `CardDetailsSingleLineTextField`: Fix bug causing slight difference between the default input text error state color and the default error message color.
133+
- `CardDetailsSingleLineTextField`: Fixed constraints so that the text input widget height properly expands/shrinks to match the height specified by the constructor parameters
134+
135+
## v1.1.0 (Mar 26, 2024) - First Public Release
136+
137+
### Breaking Changes
138+
- `OloPaySetupParameters`: Removed `freshSetup` parameter
139+
140+
### Updates
141+
- `CardDetailsSingleLineTextField`: Added built-in error message label to automatically display error messages
142+
- `CardDetailsSingleLineTextField`: Added `errorStyles` property to style the built-in error message label
143+
- `CardDetailsSingleLineTextField`: Added `displayErrorMessages` property to control visibility of the error message label
144+
- `CardDetailsSingleLineTextField`: Added custom error message support via the `customErrorMessages` property
145+
- `CardDetailsSingleLineTextField`: Added support for custom fonts via `TextStyles`
146+
- `CardDetailsSingleLineTextField`: Fixed issue on iOS sometimes causing duplicate error messages to display
147+
- `OloPaySdk`: Added `getFontNames()` for help with debugging custom font issues on iOS
148+
- `OloPaySdk`: Changed `isDigitalWalletReady()` on iOS so it returns false if the SDK isn't initialized to align with Android behavior
149+
- `TextStyles`: Added `fontAsset` and `iOSFontName` properties
150+
151+
## v1.0.1 (Feb 7, 2024)
152+
153+
### Bug Fixes
154+
- `CardDetailsSingleLineTextField`: Fix small edge case preventing `textStyles` and `paddingStyles` from respecting theme values
155+
- `CardType`: Fix typo causing Mastercard cards to map to `CardType.unknown`
156+
157+
### Updates
158+
- `TextStyles`: Fixed incorrect documentation for `merge()`
159+
- `TextStyles`: Added `defaultCursorColor` property
160+
161+
## v1.0.0 (Jan 26, 2024)
162+
163+
### Updates
164+
- ReadMe updates
165+
166+
## v0.3.0 (Jan 17, 2024)
167+
168+
### Breaking Changes
169+
- Consolidate import statements so only one is required
170+
- Renamed classes and types for clarity
171+
- `PaymentCardDetailsSingleLineWidget` --> `CardDetailsSingleLineTextField`
172+
- `PaymentCardDetailsSingleLineWidgetController` --> `CardDetailsSingleLineTextFieldController`
173+
- `PaymentCardDetailsSingleLineWidgetControllerCreated` --> `CardDetailsSingleLineTextFieldControllerCreated`
174+
- `PaymentCardDetailsSingleLineWidgetOnErrorMessageChanged` --> `CardDetailsErrorMessageChanged`
175+
- `PaymentCardDetailsSingleLineWidgetOnInputChanged` --> `CardDetailsInputChanged`
176+
- `PaymentCardDetailsSingleLineWidgetOnValidStateChanged` --> `CardDetailsValidStateChanged`
177+
- `PaymentCardDetailsSingleLineWidgetOnFocusChanged` --> `CardDetailsFocusChanged`
178+
- `PaymentMethod.cardType`: Changed type from `String` to `CardType`
179+
- Updated all data classes to use `final` properties and `const` constructors
180+
- `OloPaySetupParameters`
181+
- `GooglePaySetupParameters`
182+
- `ApplePaySetupParameters`
183+
- `DigitalWalletPaymentParameters`
184+
- `GooglePayVendorParameters`
185+
- `PaymentMethod`
186+
- `CardFieldState`
187+
- `Hints`
188+
- `TextStyles`
189+
- `BackgroundStyles`
190+
- `PaddingStyles`
191+
192+
### Updates
193+
- Change minimum iOS version to iOS 13
194+
- `CardDetailsSingleLineTextField`: Add support for light/dark themes
195+
- `CardDetailsSingleLineTextField`: Add explicit default styles
196+
- `CardDetailsSingleLineTextField`: Add support for updating styles based on state changes
197+
198+
199+
## v0.2.0 (Dec 21, 2023)
200+
201+
### Breaking Changes
202+
- `OloPaySdk.initializeOloPay()`: Changed from positional to named parameters
203+
- `PaymentCardDetailsSingleLineWidgetControllerCreated`: Moved typedef to `data_types.dart`
204+
- `PaymentCardDetailsSingleLineWidget`: Changed `onControllerCreated` to a required parameter
205+
206+
### Updates
207+
- `PaymentCardDetailsSingleLineWidget`: Background and text styling support
208+
- `PaymentCardDetailsSingleLineWidget`: Added event handlers for error message changes, valid state changes, and input changes
209+
- `PaymentCardDetailsSingleLineWigetController`: Additional methods for controlling/interacting with the widget
210+
- Digital Wallet Support (Apple Pay & Google Pay)
211+
212+
213+
## v0.1.0 (Dec 11, 2023)
214+
215+
### Initial Release
216+
- Use `PaymentCardDetailsSingleLineWidget` to display a single line card input widget
217+
- Use `PaymentCardDetailsSingleLineWidgetController.createPaymentMethod` to create a payment method based on user-entered card details
218+
- Uses [Olo Pay Android SDK v3.0.0](https://github.com/ololabs/olo-pay-android-sdk-releases/releases/tag/v3.0.0-full)
219+
- Uses [Olo Pay iOS SDK v4.0.0](https://github.com/ololabs/olo-pay-ios-sdk-releases/releases/tag/v4.0.0)

LICENSE

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**Olo Pay Software Development Kit License Agreement**
2+
3+
Copyright © 2022 Olo Inc. All rights reserved.
4+
5+
Subject to the terms and conditions of the license, you are hereby granted a non-exclusive, worldwide, royalty-free license to (a) copy and modify the software in source code or binary form for your use in connection with the software services and interfaces provided by Olo, and (b) redistribute unmodified copies of the software to third parties. The above copyright notice and this license shall be included in or with all copies or substantial portions of the software.
6+
7+
Your use of this software is subject to the Olo APIs Terms of Use, available at https://www.olo.com/api-usage-terms. This license does not grant you permission to use the trade names, trademarks, service marks, or product names of Olo, except as required for reasonable and customary use in describing the origin of the software and reproducing the content of this license.
8+
9+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10+

0 commit comments

Comments
 (0)