Repository navigation
Fixed
- When a single
ConfigCatOptionsinstance was shared between different clients, they also shared the sameHooksinstance. This resulted in inconsistent ready-state handling.
The type of theConfigCatOptions'shooksparameter is now aFunction(Hooks)instead ofHooks.
Now, eachConfigCatClientcreation creates a newHooksinstance, which is passed to the function set on the options.
Breaking changes
-
The type of the
ConfigCatOptions'shooksparameter is changed toFunction(Hooks).Usage is changed from:
final opts = ConfigCatOptions( hooks: Hooks(onFlagEvaluated: (details) => /* handle the event */), );
to:
final opts = ConfigCatOptions( hooks: (h) => h.addOnFlagEvaluated((details) => /* handle the event */), );