isSecretLikeKey function

bool isSecretLikeKey(
  1. String key
)

Whether a config key looks like it names a secret — masked in displays, revealable with a click. Deliberately eager: masking a harmless value costs one click, showing a secret on a screen share costs more.

Implementation

bool isSecretLikeKey(String key) =>
    _secretKeyPattern.hasMatch(key) || key.toLowerCase() == 'key';