Skip to main content

Migration Notes & Changelog

This guide helps you migrate from Gameball Flutter SDK v2 to v3.2.0.

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 as gameCompleted
  • 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=true open in the system browser, or in your own handler via externalLinkCallback
  • Channel Merging: ShowProfileRequestBuilder accepts optional mobile and email
  • 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.0 (Non-Breaking)

  • Update pubspec.yaml to gameball_sdk: ^3.2.0, then run flutter 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:
v3.2.0:

2. Customer Registration

v2:
v3.2.0:

3. Event Tracking

v2:
v3.2.0:

4. Show Profile Widget

v2:
v3.2.0:

Migration Steps

1

Update Dependency

Update your pubspec.yaml to use SDK v3.2.0:
Run 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 21+, targetSdkVersion 34
  • iOS: iOS 12.0+

Additional Resources

If you encounter any issues during migration, check the GitHub repository for known issues and solutions, or contact Gameball support.

Next Steps