Integrating Firebase Analytics
One of the most relevant features of Firebase is getting real feedback about how your app is used, and for that, you can use Firebase Analytics.
Firebase Analytics is an incredibly powerful tool, easy to set up and use, and can give you invaluable information about your users and your app. In this recipe, you will set up a custom event and log it into Firebase Analytics.
Getting ready
To follow along with this recipe, you need to complete the previous recipes in this chapter.
How it works...
You will now add firebase_analytics
to your app and activate a custom event:
- In a Terminal window, in your project’s directory, add the dependency to Firebase Analytics:
flutter pub add firebase_analytics
- In the
screens
folder in your project, create a new file, calledhappy_screen.dart
. - At the top of the new file, import
material.dart
andfirebase_analytics
:import 'package:flutter/material...