init method

void init({
  1. InngageProps? inngageProps,
  2. AppFlyerProps? appFlyerProps,
  3. AmplitudeProps? amplitudeProps,
})

Implementation

void init({
  InngageProps? inngageProps,
  AppFlyerProps? appFlyerProps,
  AmplitudeProps? amplitudeProps,
}) {
  this.inngageProps = inngageProps ?? this.inngageProps;
  this.appFlyerProps = appFlyerProps ?? this.appFlyerProps;
  this.amplitudeProps = amplitudeProps ?? this.amplitudeProps;

  if (useFirebaseAnalytics &&
      !GetIt.I.isRegistered<FirebaseAnalyticsImpl>()) {
    GetIt.I.registerSingleton(FirebaseAnalyticsImpl());
  }
  if (inngageProps != null) {
    GetIt.I.registerSingleton(InngageAnalyticsImpl(props: inngageProps));
  }
  if (appFlyerProps != null) {
    GetIt.I.registerSingleton(AppFlyerAnalyticsImpl(props: appFlyerProps));
  }
  if (amplitudeProps != null) {
    GetIt.I.registerSingleton(AmplitudeAnalyticsImpl(props: amplitudeProps));
  }
}