reverseDict function

dynamic reverseDict(
  1. dynamic dict
)

Implementation

reverseDict(dict) {
    var result = {};
    for (var key in dict) {
        result[dict[key]] = int.parse(key);
    }

    return result;
}