A Flutter package for integrating HackTrack error and event tracking into Flutter applications.
Example Usage in Flutter/Dart in main.dart: Email and uid is optional among other params. Decide yourself what you want to log.
if (!kDebugMode) {
final prefs = await SharedPreferences.getInstance();
PlatformDispatcher.instance.onError = (error, stack) {
HackTrack.logError(
message: "$error",
level: "error",
stackTrace: "$stack",
userUid: (prefs.getString("UUID") ?? "N/A").toString(),
// Pass both of these in via environment variables.
// Available in the Integration Guide in HackTrack web portal.
apiKey: "",
apiUrl: "",
);
return true;
};
}How a logged error looks in the web portal: