2017-09-22 04:48:22 +00:00
|
|
|
final Map<Symbol, String> _cache = {};
|
|
|
|
|
2017-08-03 16:40:21 +00:00
|
|
|
String fastNameFromSymbol(Symbol s) {
|
2017-09-22 04:48:22 +00:00
|
|
|
return _cache.putIfAbsent(s, () {
|
|
|
|
String str = s.toString();
|
|
|
|
int open = str.indexOf('"');
|
|
|
|
int close = str.lastIndexOf('"');
|
|
|
|
return str.substring(open + 1, close);
|
|
|
|
});
|
|
|
|
}
|