codeMap<Value> function

Map<String, Value> codeMap<Value>(
  1. Map map,
  2. ValueMaker<Value> valueMaker
)

Implementation

Map<String, Value> codeMap<Value>(Map map, ValueMaker<Value> valueMaker) {
  Map<String, Value> ret;
  if (map != null) {
    Map<String, dynamic> tempSrcMap = map.cast<String, dynamic>();
    ret = <String, Value>{};
    for (String key in tempSrcMap.keys) {
      ret[key] = valueMaker(tempSrcMap[key]);
    }
  }
  return ret;
}