run<T> static method

T run<T>(
  1. T body(), {
  2. DateTime now()?,
  3. double random()?,
  4. OpenUiTimeZone? timeZone,
})

Runs body with these inputs in place of the defaults; null keeps one.

Implementation

static T run<T>(
  T Function() body, {
  DateTime Function()? now,
  double Function()? random,
  OpenUiTimeZone? timeZone,
}) => runZoned(
  body,
  zoneValues: {_key: (now: now, random: random, timeZone: timeZone)},
);