title: How to log Firebase Analytics events in Flutter
body: <p>I want to log Firebase event in Flutter, but I cannot log any event.
  I want to count what times events are done, so when tapping the button, I log the event.</p>
  
  <pre><code>class Onboarding extends StatefulWidget {
    Onboarding({Key key, this.analytics, this.observer})
        : super(key: key);
  
    final FirebaseAnalytics analytics;
    final FirebaseAnalyticsObserver observer;
  
    @override
    _OnboardingState createState() =&gt; _OnboardingState(analytics, observer);
  }
  </code></pre>
  
  <pre><code>class _OnboardingState extends State&lt;Onboarding&gt; {
    _OnboardingState(this.analytics, this.observer);
    final FirebaseAnalyticsObserver observer;
    final FirebaseAnalytics analytics;
  
  ...
    Future&lt;void&gt; _sendAnalyticsEvent(FirebaseAnalytics analytics, 
  FirebaseAnalyticsObserver observer) async {
      await analytics.logEvent(
        name: 'onboarding'
      );
    }
  
    Materialbotton(
      child: onPressed: () async {
      _sendAnalyticsEvent(analytics, observer);
      ...
      }
    )
  </code></pre>
  
  <p>However, if I see Firebase console, I see nothing</p>