A Flutter plugin to use the Google Analytics for Firebase API.
For Flutter plugins for other Firebase products, see FlutterFire.md.
To use this plugin, add
firebase_analytics as a dependency in your pubspec.yaml file. You must also configure firebase analytics for each platform project: Android and iOS (see the example folder or https://codelabs.developers.google.com/codelabs/flutter-firebase/#4 for step by step details).
PageRoute transitions, add a
FirebaseAnalyticsObserver to the list of
NavigatorObservers on your
Navigator, e.g. if you're using a
FirebaseAnalytics analytics = FirebaseAnalytics(); MaterialApp( home: MyAppHome(), navigatorObservers: [ FirebaseAnalyticsObserver(analytics: analytics), ], );
You can also track transitions within your
PageRoute (e.g. when the user switches from one tab to another) by
RouteAware and subscribing it to
for an example of how to wire that up.
example directory for a complete sample app using Google Analytics for Firebase.
Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.
This was originally incorrectly pushed in the
2.0.0instead. That's the correctly versioned new push of
BAD. This was a breaking change that was incorrectly published on a minor version upgrade, should never have happened. Reverted by 1.2.0+1.
"Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library."
PlatformExceptions caught by
METHODAndroid constant used for
NavigatorObserver) to automatically log
Demonstrates how to use the firebase_analytics plugin.
For help getting started with Flutter, view our online documentation.
Add this to your package's pubspec.yaml file:
dependencies: firebase_analytics: ^2.1.1+3
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|2.1.1+3||Apr 18, 2019|
|2.1.1+2||Apr 14, 2019|
|2.1.1+1||Apr 12, 2019|
|2.1.1||Apr 3, 2019|
|2.1.0||Mar 28, 2019|
|2.0.3||Mar 6, 2019|
|2.0.2+1||Feb 21, 2019|
|2.0.2||Feb 21, 2019|
|2.0.1||Feb 8, 2019|
|2.0.0||Jan 28, 2019|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Apr 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
|Dart SDK||>=2.0.0-dev.28.0 <3.0.0|