postal library

Pakistani postal code lookups.

Same as the pakdatakit/postal entry point of the npm package.

Classes

PostOffice
A delivery post office from Pakistan Post's post code directory.

Functions

getCityByPostalCode(String postalCode) → String?
Returns the city for a Pakistani postal code (whitespace is ignored), or null if not found.
getPostalAreas(String city) → List<String>
Returns the known area names of a city's postal entries, sorted.
getPostalCode(String city) → String?
Returns the primary (GPO) postal code for a Pakistani city, or null.
getPostalCodes(String city) → List<String>
Returns all known postal codes for a city (case-insensitive), sorted.
getPostOffice(String code) → PostOffice?
Returns the delivery post office for a post code (whitespace is ignored), from Pakistan Post's directory of about 2,560 offices, or null if the code is not in the directory.
searchPostalCodes(String query) → List<String>
Searches postal entries by city name, area, or postal code prefix, and returns the matching postal codes, sorted.
searchPostOffices(String query) → List<PostOffice>
Searches Pakistan Post's directory by office name, town or post code.