logNavigation static method
void
logNavigation({
Implementation
static void logNavigation({required String from, required String to}) {
if (!isInitialized() && _cachedAppApplication?.id == null) {
if (kDebugMode) {
print("[GraphAnalytics] Error : Not Initialized");
}
return;
}
try {
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,
);
} catch (err) {
if (kDebugMode) {
print("[GraphAnalytics] Error : $err");
}
}
}