track static method
Tracks the given event using the specified tracker
namespace and with optional context entities.
Implementation
static Future<void> track(Event event,
{required String tracker, List<SelfDescribing>? contexts}) async {
var message = {
'tracker': tracker,
'eventData': event.toMap(),
'contexts': contexts?.map((c) => c.toMap()).toList()
};
message.removeWhere((key, value) => value == null);
await _channel.invokeMethod(event.endpoint(), message);
}