getSiGunGuNameFromCode function
Returns the name of the Si/Gun/Gu area code from the code
.
If somehow the code
is not found, it throws an exception.
Implementation
String getSiGunGuNameFromCode(
{required String siDo, required String code, String languageCode = 'ko'}) {
List<AreaCode> siGunGuCodes =
getSiGunGuCodes(languageCode: languageCode, siDo: siDo);
AreaCode siGunGu = siGunGuCodes.firstWhere(
(address) => address.code == code,
);
return siGunGu.name;
}