redact static method

Object? redact(
  1. Object? data, {
  2. int depth = 0,
})

Returns a copy of data with secret values masked. JSON strings stay strings, FormData becomes a map. Never throws.

Implementation

static Object? redact(Object? data, {int depth = 0}) {
  try {
    return _redact(data, depth);
  } catch (_) {
    return mask;
  }
}