experiment method

Future<ExperimentAssignment?> experiment(
  1. String key
)

This subscriber's variant assignment for experiment key, or null when not enrolled. Unlike the flag getters, a non-null result also records an exposure (best-effort, deduped) for experiment analysis — call this only where the variant assignment actually drives what the user sees, not speculatively, or exposure counts get inflated.

Implementation

Future<ExperimentAssignment?> experiment(String key) => _platform.experiment(key);