Pricing

Integration · SDK

fl

Flutter

The Flutter client ships on pub.dev as metapolicy_sdk. Dart 3+. Same six-method surface as every other SDK; same wire format. Works with both the Cupertino and Material UI stacks.

The contract

What flows in

  • Decide requests returning Future
  • Reward events as Future; await for confirm-on-server semantics
  • Stream interface for slate decisions where the assignment may revalidate

What flows out

  • Assignment + propensity available on the same Future
  • Errors typed via DecideException, ServerException, NetworkException

Setup

  1. 01flutter pub add metapolicy_sdk
  2. 02Initialise in main() with the environment-scoped API key
  3. 03Call client.decide(...) at the decision widget
  4. 04Emit rewards on observable outcome events
  5. 05Optional: MetapolicyProvider widget for InheritedWidget-style propagation through the tree

Cross-platform considerations

Decision caching uses Flutter's app lifecycle observer to invalidate on app resume, matching the iOS and Android native SDKs. The contract is platform-agnostic by design.

If you also run native iOS or Android entry points, all three SDKs hit the same backend and use the same propensity log — the lift readout aggregates across surfaces.

Wire Flutter in a 30-minute call.

We pair with your engineer, ship the integration live, and run the first decision on your stack.

Book the call