emit static method

void emit(
  1. String kind,
  2. Map<String, Object?> data
)

Posts a nylo.<kind> event to the nylo VM service stream.

Implementation

static void emit(String kind, Map<String, Object?> data) {
  onEmit?.call(kind, data);
  if (kReleaseMode || !_extensionsRegistered) return;
  try {
    developer.postEvent('nylo.$kind', data, stream: eventStream);
  } catch (_) {
    // The VM service isn't available (e.g. an unsupported web runtime).
  }
}