import 'package:firebase_analytics/firebase_analytics.dart';

class AnalyticsService {
  static final FirebaseAnalytics analytics =
      FirebaseAnalytics.instance;

  static Future<void> logScreenView(String screenName) async {
    await analytics.logScreenView(
      screenName: screenName,
    );
  }

  static Future<void> logLogin(String method) async {
    await analytics.logLogin(
      loginMethod: method,
    );
  }

  static Future<void> logEvent(
      String name, {
        Map<String, Object>? parameters,
      }) async {
    await analytics.logEvent(
      name: name,
      parameters: parameters,
    );
  }
}