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.0.1
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.0.1||Feb 8, 2019|
|2.0.0||Jan 28, 2019|
|1.2.0+1||Jan 28, 2019|
|1.2.0||Jan 25, 2019|
|1.1.0||Jan 3, 2019|
|1.0.6||Nov 10, 2018|
|1.0.5||Oct 30, 2018|
|1.0.4||Oct 12, 2018|
|1.0.3||Aug 21, 2018|
|1.0.2||Jul 23, 2018|
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 Feb 14, 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|