didYouMean function

String didYouMean(
  1. String wrong,
  2. Iterable<String> options
)

, did you mean 'x'? for the closest of options, else nothing.

Implementation

String didYouMean(String wrong, Iterable<String> options) {
  final close = closestName(wrong, options);
  return close == null ? '' : " (did you mean '$close'?)";
}