overrideAnsiOutput<T> function

T overrideAnsiOutput<T>(
  1. bool enableAnsiOutput,
  2. T body()
)

Allows overriding ansiOutputEnabled to enableAnsiOutput for the code run within body.

Implementation

T overrideAnsiOutput<T>(bool enableAnsiOutput, T Function() body) =>
    runZoned(body, zoneValues: <Object, Object>{AnsiCode: enableAnsiOutput});