track method
Implementation
@override
Future<void> track(
HackleEvent event, {
HackleUser? user,
}) async {
try {
final Map<String, Object?> arguments = {
Argument.event.value: event.toMap(),
Argument.user.value: user?.toMap(),
};
return methodChannel.invokeMethod(Method.track.value, arguments);
} catch (e) {
log("Failed to track", level: 3, error: e);
}
}