Skip to content

5.1.0

Latest

Choose a tag to compare

@z4kn4fein z4kn4fein released this 26 Oct 16:42
4d6b1ad

Fixed

  • When a single ConfigCatOptions instance was shared between different clients, they also shared the same Hooks instance. This resulted in inconsistent ready-state handling.
    The type of the ConfigCatOptions's hooks parameter is now a Function(Hooks) instead of Hooks.
    Now, each ConfigCatClient creation creates a new Hooks instance, which is passed to the function set on the options.

Breaking changes

  • The type of the ConfigCatOptions's hooks parameter is changed to Function(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 */),
    );