connectionStateNames top-level property

Map<String, ConnectionState> connectionStateNames
final

Implementation

final connectionStateNames = {
  for (ConnectionState entry in ConnectionState.values)
    entry.toString().split(".")[1]: entry
};