Effect constructor

Effect(
  1. void _fn()?
)

Creates a new Effect and executes the given function immediately.

Implementation

Effect(this._fn) : _cleanupFn = null {
  run();
}