setupServices function

dynamic setupServices({
  1. String mixPanelToken = "",
  2. String arRegion = "",
  3. String arAccessKey = "",
  4. String arSecretKey = "",
  5. String projectARN = "",
  6. String sentryDSN = "https://891ca197d27341cbd2c2a92fc2990d18@o4506103178723328.ingest.sentry.io/4506103180427264",
  7. String rudderStackKey = "",
  8. String rudderPlaneUrl = "https://rudderstacgwyx.dataplane.rudderstack.com",
  9. bool isLocal = true,
  10. String env = "DEV",
})

mixPanelToken -> used for analytics tracking purposes arRegion, arAccessKey, arSecretKey, projectARN -> this data is fetched if you setup amazon rekognition and utilized the cloud image labeling rudderStackKey -> fetch this when you have access to your rudderstack, rudderPlaneUrl and rudderControlPlaneUrl isLocal -> this will be used to identify if it will

Implementation

setupServices(
    {String mixPanelToken = "",
    String arRegion = "",
    String arAccessKey = "",
    String arSecretKey = "",
    String projectARN = "",
    String sentryDSN =
        "https://891ca197d27341cbd2c2a92fc2990d18@o4506103178723328.ingest.sentry.io/4506103180427264",
    String rudderStackKey = "",
    String rudderPlaneUrl = "https://rudderstacgwyx.dataplane.rudderstack.com",
    bool isLocal = true,
    String env = "DEV"}) async {
  serviceLocator?.registerLazySingleton(() => SentryUtil());

  _sharedPref = await SharedPreferences.getInstance();
  SimpleConnectionChecker checker = SimpleConnectionChecker();
  serviceLocator?.registerLazySingleton(() => NetworkUtil(checker));
  serviceLocator?.allowReassignment = true;
  _setupImagePicker();
  serviceLocator?.registerLazySingleton(() => PrefUtils(_getSharedPref()));
  serviceLocator?.registerLazySingleton(() => ThemeBloc(ThemeState(
        themeType: getPrefUtils().getThemeData(),
      )));
  _setupUserDetailsServices();
  _setupScanServices();
  _setupLogService();
  _setupBloc();
  // rekognition
  myProjectARN = projectARN;
  _setupSDK(isLocal: isLocal);
  _setupRudderStack(rudderStackKey, rudderPlaneUrl: rudderPlaneUrl);
  _setupAnalytics(mixPanelToken);
}