logScreenInfo static method

void logScreenInfo({
  1. required String screenName,
  2. required String methodName,
})

Implementation

static void logScreenInfo(
    {required String screenName, required String methodName}) {
  if (!isInitialized() && _cachedAppApplication?.id == null) {
    if (kDebugMode) {
      print("[GraphAnalytics] Error : Not Initialized");
    }
    return;
  }
  Map<String, String> body = {
    'appCollectionId': _cachedAppApplication!.id!,
    'type': "child",
    'from': screenName,
    'to': methodName,
  };

  post(
    Uri.parse("http://54.159.43.52:3001/api/graph/log"),
    body: body,
  );
}