import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:flutter/cupertino.dart';

class AnalyticsService {
  final FirebaseAnalytics _analytics = FirebaseAnalytics();

  FirebaseAnalyticsObserver getAnalyticsObserver() => FirebaseAnalyticsObserver(analytics: _analytics);

  Future logEvent({@required String eventCategory, @required String eventAction}) async {
    await _analytics.logEvent(name: 'event', parameters: {
      "eventCategory": eventCategory,
      "eventAction": eventAction,
    });
  }
}
