Effect.group constructor
Bundles a collection of effects into a composite Effect managing their aggregated lifecycle.
effects: The collection of child effects to group together. Duplicate instances are automatically deduplicated.
Ensures:
- Returns a composite Effect managing the aggregated lifecycle of
effects.
Examples
final group = Effect.group([searchEffect, loggingEffect]);
final runner = group.start();
runner.stop(); // Atomically cleans up both effects
Implementation
@pragma('vm:prefer-inline')
factory Effect.group(Iterable<Effect> effects) => _EffectGroup(effects);