untracked<T> function

T untracked<T>(
  1. T fn(), {
  2. ReactiveContext? context,
})

Untracked ensures there is no tracking derivation while the given action runs. This is useful in cases where no observers should be linked to a running (tracking) derivation.

Implementation

T untracked<T>(T Function() fn, {ReactiveContext? context}) =>
    (context ?? mainContext).untracked(fn);