Getting Started
Install the Gameball Flutter SDK into your app
Last updated
Install the Gameball Flutter SDK into your app
Last updated
The Gameball SDK for Flutter enables you to use the show Gameball customer profile in your app, track app customer events, and integrate referrals.
Follow the below steps to start installing Flutter SDK package to your app
Install package using flutter
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Firebase is an integral dependency to the sdk, you'll have to include the following dependencies in your project's pubspec.yaml
file
Then run the flutter pub get
command.
Now in your Dart code, you can use:
To create a GameballApp instance you need to call the getInstance method.
To initialize GameballApp instance in your application class, use the init method which takes the following parameters (replace the braces with your values)
APIKey string
Required
The API key of the Client account
lang string
Optional
The language that the SDK should be initialized with (based on the Client's configuration)
shop string
Optional
Shopify Only
Store name with myshopify.com domain. Used if your app is a mobile app for a Shopify store connected to Gameball
platform string
Optional
The platform you application used:
Shopify
Salla
any
For websites with multiple languages, how you can change Gameball widget language based on active website language. Gameball supports multiple languages for the customer profile widget. The widget language can be changed based on your customer's active language on the website.
English: en
Arabic: ar
French: fr
Spanish: es
German: de
Portuguese: pt
Polish: pl
Italian: it
Hungarian: hu
Chinese (Traditional, Taiwan): zh-tw
Dutch: nl
Swedish: sv
Norwegian: no
Danish: dk
Japanese: ja
In order to show the correct language of the widget based on the active language on the website, you just need to use the language code inside the lang
variable in the code snippet.
Learn how you can configure the languages on your Gameball account through this .