import 'package:firebase_analytics/firebase_analytics.dart';

class AnalyticsService {
  // final FirebaseAnalytics _analytics = FirebaseAnalytics();
  static FirebaseAnalyticsObserver observer = FirebaseAnalyticsObserver(analytics: analytics);
  static FirebaseAnalytics analytics = FirebaseAnalytics.instance;
  FirebaseAnalyticsObserver getAnalyticsObserver() => FirebaseAnalyticsObserver(analytics: analytics);

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