getPostCodes method
Returns list of PostCode object
this method looks for every post code data in this wilaya and return the result as list of PostCode
Implementation
List<PostCode?>? getPostCodes() {
return algeria_postcodes
.where((element) => ((element['wilaya_name'] == data!['wilaya_name']) &&
(element['wilaya_name'] == data!['daira_name']) &&
(element['wilaya_name'] == data!['commune_name'])))
.map((e) => PostCode(data: e))
.toSet()
.toList();
}