swift_metrics_bridge 0.1.0 copy "swift_metrics_bridge: ^0.1.0" to clipboard
swift_metrics_bridge: ^0.1.0 copied to clipboard

Flutter bridge to Apple's swift-metrics. Provides counters, floating-point counters, and timers via platform channels to iOS swift-metrics instances.

swift_metrics_bridge #

CI pub package license

Flutter bridge to Apple's swift-metrics framework.

Platform Support #

iOS Android
Yes No

Installation #

dependencies:
  swift_metrics_bridge: ^0.1.0

Usage #

import 'package:swift_metrics_bridge/swift_metrics_bridge.dart';

// Integer counter
const counter = Counter('button_taps');
await counter.increment();
await counter.increment(value: 5);

// Floating-point counter
const revenue = FloatingPointCounter('revenue');
await revenue.increment(value: 9.99);

// Timer
const timer = MetricsTimer('api_latency');
await timer.record(Duration(milliseconds: 250));
await timer.recordNanoseconds(1500);

How It Works #

Each metric instance maps to a corresponding swift-metrics type on iOS via method channels. By default, swift-metrics uses a no-op backend. To persist metrics, configure a swift-metrics backend (e.g., Scout) on the iOS side.

0
likes
160
points
145
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter bridge to Apple's swift-metrics. Provides counters, floating-point counters, and timers via platform channels to iOS swift-metrics instances.

Repository (GitHub)
View/report issues

Topics

#metrics #swift-metrics #ios

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on swift_metrics_bridge

Packages that implement swift_metrics_bridge