noopKeyHandler<K, T> function

KeyedOptionsHandler<K, T> noopKeyHandler<K, T>(
  1. String? key
)

Implementation

KeyedOptionsHandler<K, T> noopKeyHandler<K, T>(String? key) {
  _log.severe(
      "Missing/invalid handler for $T and key $key -- using noop handler");
  return _KeyedOptionsHandler<K, T>(
    "noop",
    canShowAll: false,
    placeholder: "Invalid configuration.",
    toOption: (T? from) => from == null
        ? null
        : Option.keyed<K, T>(null, null, label: "Invalid configuration: $from"),
    toKey: (T from) => null,
  );
}