logNavigation static method

void logNavigation({
  1. required String from,
  2. required String to,
})

Implementation

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

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