runInZone<T> static method

T runInZone<T>(
  1. T callback()
)

Run code in the interception zone to capture print statements This is useful for wrapping specific code blocks

Implementation

static T runInZone<T>(T Function() callback) {
  if (_interceptionZone != null) {
    return _interceptionZone!.run(callback);
  }
  return callback();
}