enrich method

Future<Map<String, String>> enrich(
  1. Map<String, String>? payload
)

Adds Flutter specific payload attributes to outgoing signals before passing them to the native platform API. This method will overwrite the default telemetryClientVersion.

Implementation

Future<Map<String, String>> enrich(Map<String, String>? payload) async {
  Map<String, String> result = payload ?? {};
  result['telemetryClientVersion'] = "Flutter $telemetryClientVersion";
  result['dartVersion'] = versionReader.readVersion();
  return result;
}