init static method
id,appCollectionId,accessToken,appAccessToken you will get it when you download the
also default timeout to initialise is 3 seconds you can set the timeout,
Implementation
static Future<void> init({
required String appCollectionId,
required String id,
required String accessToken,
required String appAccessToken,
int timeOut = 3,
}) async {
Map<String, String> body = {
'id': id,
'acessToken': accessToken,
'appCollectionId': appCollectionId,
'appAccessToken': appAccessToken,
};
try {
Response r = await post(
Uri.parse("https://analytics.pulsecode.in/api/graph/authPorcess"),
body: body,
).timeout(Duration(seconds: timeOut));
print(r.body);
_cachedAppApplication = AppApplication.fromRawJson(r.body);
} catch (err) {
if (kDebugMode) {
print("[GraphAnalytics] Error : $err");
}
}
}