withCallLimit<T> static method
Runs body with every cheap VM call held to limit and every expression evaluate held to evaluateLimit (10 s when null, since compiling is legitimate); null limit lifts an outer one, and a tree read gets twice as long.
Implementation
static Future<T> withCallLimit<T>(Duration? limit, Future<T> Function() body, {Duration Function()? evaluateLimit}) =>
runZoned(body, zoneValues: {_callLimitKey: limit, _evalLimitKey: evaluateLimit});