Migration Notes & Changelog
This guide helps you upgrade from Gameball Flutter SDK v3 to v4.0.0, and migrate from v2 to v3.What’s New in v4.0.0
New Features in v4.0.0
- In-App Messaging:
startInAppMessaging(customerId:, navigatorKey:)displays the slide-up, modal, and full-screen campaigns you create in the Gameball dashboard, andstopInAppMessaging()stops it on logout. Nothing runs until you callstartInAppMessaging, so upgrading without it changes nothing. See In-App Messaging - In-App Messaging Hooks:
beforeDisplay,onAction, andonNavigatelet you postpone a message, handle a tap yourself, and routenavigateactions through go_router or any other router. TheonInAppMessagestream reports each selected message - Purchase Logging:
logPurchase(customerId:, productId:, price:, currency:, ...)sends apurchaseevent to Gameball that campaigns can target and filter on - Diagnostic Logging Switch:
gameballInAppMessagingLoggingcontrols in-app messaging console logs. It is on in debug builds and off in release builds - Published Package: the package on pub.dev now contains only the SDK sources. Tests, the example app, and internal docs are excluded
Migrate v3.x → v4.0.0 (Breaking)
- Set
minSdkto 24 inandroid/app/build.gradle. - Set the iOS deployment target to 15.0 in
ios/Podfile(platform :ios, '15.0') and for the Runner target in Xcode, then runpod install. - Update
pubspec.yamltogameball_sdk: ^4.0.0, then runflutter pub get. - (Optional) Adopt in-app messaging. See In-App Messaging.
- (Optional) If you build
purchaseevents yourself, replace them withlogPurchaserather than sending both.
Coming from v3.2.x or earlier? v4.0.0 also includes the v3.2.2 and v3.3.x releases: per-call and global widget language (
ShowProfileRequestBuilder lang and setLanguage(lang)), push notification click tracking (handlePushClick), and initializeCustomer always registering customers, with isGuest ignored. See the release history.What’s New in v3.2.1
- Fixed — Widget Shop Parameter: the
shopvalue was sent to the widget URL under a duplicateplatformkey, which broke widget coupon redemption (infinite loading) when bothplatformandshopwere configured. No API changes — update the version and runflutter pub get.
What’s New in v3.2.0
Widget Events, Dismissal & External Links — v3.2.0 keeps all v3.x code compatible. Every new capability is opt-in, so an existing integration keeps working after a version bump.
New Features in v3.2.0
- Widget Event Channel:
ShowProfileRequestBuilder().widgetEventCallback(...)receives events posted from the widget, such asgameCompleted - Host-Initiated Dismiss:
GameballApp.getInstance().hideProfile()dismisses the widget programmatically - Web-Initiated Close: the widget can dismiss itself via
window.GameballWidget.closeWidget() - External-Link Handling: links tagged
gbExternalBrowser=trueopen in the system browser, or in your own handler viaexternalLinkCallback - Channel Merging:
ShowProfileRequestBuilderaccepts optionalmobileandemail - Diagnostic Logging: the SDK records internal diagnostic logs to aid troubleshooting. No integration changes required
Dependency Constraints in v3.2.0
share_plus, device_info_plus, and package_info_plus constraints were widened. The lower bounds are unchanged, so existing apps resolve the same versions and nothing breaks on upgrade.
Apps that opt into
share_plus 13.x require Flutter 3.38.1+ and Dart 3.10+. Staying on your current share_plus version needs no action.Migrate v3.1.x → v3.2.1 (Non-Breaking)
- Update
pubspec.yamltogameball_sdk: ^3.2.1, then runflutter pub get. - No code changes are required. Adopt the new widget capabilities only if you need them — see Show Profile Widget.
New Features in v3.1.1
- Guest Mode Support: Profile widget can open without customerId
- Non-Throwing ShowProfileRequest: customerId optional for guest mode
- Session Token Support: Optional token-based authentication (from 3.1.0)
- Automatic Endpoint Versioning: Routes to v4.1 API when token is present
- Per-Request Token Override: Override global token on individual API calls
- Global Token Management: Token updates globally when passed to any method
- Backward Compatible: All v3.0.0 code works unchanged
Improved API
Cleaner API design with better error handling and null safety
Better Performance
Optimized SDK initialization and reduced package size
Flutter 3.x Support
Full compatibility with Flutter 3.x and latest Firebase plugins
Enhanced Type Safety
Better Dart null safety support and compile-time checks
Breaking Changes
1. SDK Initialization
v2:2. Customer Registration
v2:3. Event Tracking
v2:4. Show Profile Widget
v2:Migration Steps
From v3.x to v4.0.0
1
Raise Platform Minimums
Set Also set
minSdk to 24 in android/app/build.gradle, and the iOS deployment target to 15.0:IPHONEOS_DEPLOYMENT_TARGET to 15.0 for the Runner target in Xcode.2
Update Dependency
Update your Run
pubspec.yaml to use SDK v4.0.0:flutter pub get and cd ios && pod install.3
(Optional) Adopt In-App Messaging
Pass your
MaterialApp’s navigator key to startInAppMessaging once the customer is known, and call stopInAppMessaging() on logout. See In-App Messaging.4
Test
Verify that
initializeCustomer, sendEvent, and showProfile behave as before on both iOS and Android.From v2.x to v3
1
Update Dependency
Update your Run
pubspec.yaml to use SDK v3.2.1:flutter pub get and cd ios && pod install.2
Update Initialization
Replace initialization with
GameballConfigBuilder() pattern:3
Update Customer Registration
Use
InitializeCustomerRequestBuilder and CustomerAttributesBuilder:4
Update Event Tracking
Use
EventBuilder with chained methods:5
Update Show Profile
Use
ShowProfileRequestBuilder for showing profile:6
Test Thoroughly
Test all Gameball functionality on both iOS and Android to ensure the migration is successful.
Compatibility
- Minimum Flutter Version: 1.17.0 (3.0+ recommended)
- Dart: 3.4.4+
- Android: API level 24+ (Android 7.0) as of v4.0.0, targetSdkVersion 34
- iOS: iOS 15.0+ as of v4.0.0
Additional Resources
- Check the gameball-flutter releases page for version history and release notes
- Visit Gameball Docs for the latest documentation