track static method Null safety
Track custom events associated with the current context for data export or experimentation.
The eventName
is the key associated with the event or experiment. data
is an optional parameter for additional
data to include in the event for data export. metricValue
can be used to record numeric metric for experimentation.
Implementation
static Future<void> track(String eventName, {LDValue? data, num? metricValue}) async {
var args = {'eventName': eventName, 'data': data?.codecValue(), 'metricValue': metricValue?.toDouble()};
await _channel.invokeMethod('track', args);
}