isKeyStringable function

bool isKeyStringable(
  1. DartType keyType
)

Returns true if keyType can be automatically converted to/from String – and is therefor usable as a key in a Map.

Implementation

bool isKeyStringable(DartType keyType) =>
    isEnum(keyType) || instances.any((inst) => inst.matches(keyType));