init static method

Future<void> init({
  1. required String appCollectionId,
  2. required String id,
  3. required String accessToken,
  4. required String appAccessToken,
})

Implementation

static Future<void> init({
  required String appCollectionId,
  required String id,
  required String accessToken,
  required String appAccessToken,
}) async {
  Map<String, String> body = {
    'id': id,
    'acessToken': accessToken,
    'appCollectionId': appCollectionId,
    'appAccessToken': appAccessToken,
  };

  try {
    Response r = await post(
      Uri.parse("http://54.159.43.52:3001/api/graph/authPorcess"),
      body: body,
    );
    _cachedAppApplication = AppApplication.fromRawJson(r.body);
  } catch (err) {
    if (kDebugMode) {
      print("[GraphAnalytics] Error : $err");
    }
  }
}