setupServices function
dynamic
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",
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);
}