paymentSheetTelemetryEvents property

Stream<PaymentSheetTelemetryEvent> paymentSheetTelemetryEvents
latefinal

Privacy-safe transport diagnostics for an application-owned telemetry pipeline. These events are not authoritative payment state.

Implementation

late final Stream<PaymentSheetTelemetryEvent> paymentSheetTelemetryEvents =
    _eventChannel.receiveBroadcastStream().map((value) {
      if (value is! Map) {
        throw const FormatException(
          'Native payment sheet returned an invalid telemetry event',
        );
      }
      return PaymentSheetTelemetryEvent.fromJson(
        Map<Object?, Object?>.from(value),
      );
    }).asBroadcastStream();