sendTiming method

  1. @override
Future<void> sendTiming(
  1. String variableName,
  2. int time, {
  3. String? category,
  4. String? label,
})
inherited

Sends a Timing hit to Google Analytics. variableName specifies the variable name of the timing. time specifies the user timing value (in milliseconds). category specifies the category of the timing. label specifies the label of the timing.

Implementation

@override
Future<void> sendTiming(String variableName, int time,
    {String? category, String? label}) {
  var args = <String, String>{
    'utv': variableName,
    'utt': time.toString(),
    if (label != null) 'utl': label,
    if (category != null) 'utc': category,
  };

  return _enqueuePayload('timing', args);
}