NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev
B2Metric analytics SDK for Flutter. Collects events, manages sessions, and supports push notifications on Android and iOS.
Latest stable
1.2.0
Last release 12 days ago
10 Nov 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 7 of 7 stable releases
Nothing withdrawn
no release was ever pulled
6 months old
7 releases · first in 2026
Drag across the ruler to compare, or tap a release to open it.
B2Metric.instance.isControlMessage(data) tells you whether a push payload is a B2Metric control message: it carries the probe flag IsSilent set to "1"
B2Metric.instance.isControlMessage(data) tells you whether a push payload is a B2Metric control message: it carries the probe flag IsSilent set to "1" (what the backend sends today) or the reserved b2m_control key. B2Metric sends these silent messages in the background to detect uninstalled apps, so they are never meant to be shown to a user. Call it at the top of your push handlers and return early when it is true. It is safe to call before init(), and null is false.trackPushOpened() ignores control messages: nothing is recorded as push_opened, and no error is thrown, even before init().A/B testing. Configure experimentIds to take part in experiments created in your B2Metric panel, then read the group this device was assigned to with
experimentIds to take part in experiments created in your B2Metric panel, then read the group this device was assigned to with getExperimentGroupId(). Assignments are fetched when the SDK starts and at the beginning of each session, stored on the device, and read synchronously, so a variant is available during a build with no loading state to thread through the widget tree.experiments (a ValueListenable) and experimentChanges (a broadcast Stream) for rebuilding when assignments change. Both carry the same snapshot; the SDK ships neither a provider nor an InheritedWidget, so it does not compete with the app's own state management.getExperimentAssignments() and refreshExperiments().experimentsBaseUrl to point assignment requests at a test or staging environment.ExperimentAssignment and ExperimentsSnapshot type exports.experimentIds is set, so existing integrations are unaffected by upgrading.null when the device is outside the experiment's audience, the experiment has ended, or the first refresh has not landed yet. Give every experiment a default.setUser never moves anyone between groups and a variant cannot change underneath someone at login.Your coding agent can read these notes before it upgrades. Set up the MCP server →
One column per month.
First stable release. The public API is now considered stable under semantic versioning. No functional changes since 0.4.0.
B2Metric.setUser() to identify the current user and update their profile attributes. Accepts userId (required) plus optional name, surname, email, and
B2Metric.setUser() to identify the current user and update their profile attributes. Accepts userId (required) plus optional name, surname, email, and any custom attributes via properties.B2MetricUser type export.setUser are merged into the user_properties of subsequent events. The user_properties of each event is now a point-in-time snapshot, and device-collected fields always take precedence over custom attributes.iOS Swift Package Manager (SPM) support, required for Flutter 3.44+ where SPM is the default iOS/macOS dependency manager. CocoaPods support is retain
appIdentifier field in B2MetricConfig to identify the app registered in B2Metric. Validated as lowercase snake_case (^[a-z][a-z0-9]*(_[a-z0-9]+)*$).
appIdentifier field in B2MetricConfig to identify the app registered in B2Metric. Validated as lowercase snake_case (^[a-z][a-z0-9]*(_[a-z0-9]+)*$).app_identifier is now included in collected user properties.B2Metric.init() now requires appIdentifier in addition to apiKey. Calls without it will throw at initialization.Initial release of the B2Metric Flutter SDK.
first_open, session_start, session_end).onLog callback to forward SDK logs to a custom sink.example/.