static ErrorCode fromMap(Map<dynamic, dynamic> map) { int id = map["id"]; String name = map["name"]; return ErrorCode.valueFromName(name); }