Learn to install Tealium for Flutter.
Tealium for Flutter allows you to use the Tealium native mobile libraries for Android or iOS in your Flutter application.
- Flutter application development framework
- IDE such as Android Studio or VS Code
- Flutter plugin installed on the IDE
To help to familiarize yourself with our library, the tracking methods, and best practice implementation, explore the Tealium for Flutter sample apps.
To install the Tealium library for Flutter:
In your Flutter app project, update the
pubspec.yamlfile to add the Tealium Flutter plugin dependency as follows:
dependencies: flutter: sdk: flutter tealium: '1.0.0'
To pull the Tealium Flutter plugin dependency in your project, run the following command:
flutter pub get
Import the Dart code to your project:
Use The Tealium APIs in your Flutter project.
Initialize the Tealium instance with the
initialize() method, as shown in the following example:
var teal = Tealium.initialize("ACCOUNT", "PROFILE", "ENVIRONMENT", null, null);
initializeCustom() method initialize the Tealium instance with all initialization options, as shown in the following example:
var teal = Tealium.initializeCustom("ACCOUNT", "PROFILE", "ENVIRONMENT", null, null, "INSTANCE", true, null, null, null, true);
See the Flutter API to learn more about initialization options.
Thank you for your feedback!
This page was last updated: January 7, 2023