init static method

void init({
  1. required String projectId,
  2. required String sdkToken,
})

Temporal solution to be able to inject all the needed dependencies by the repo layer without have to change too much on the legacy code

Implementation

static void init({required String projectId, required String sdkToken}) {
  final client = Client();
  _instance = BundleService(
    credentials: Credentials(projectId: projectId, token: sdkToken),
    remoteRepository: RemoteBundleRepository(
      otaApi: OtaApi(
        otaClient: OtaClient(httpClient: client),
        downloaderClient: BundleDownloaderClient(
          httpClient: client,
          zipDecoder: ZipDecoder(),
        ),
      ),
    ),
  );
}