kataho_code library

A Flutter package for converting Nepal-focused Plus Codes into Kataho Codes.

Exported classes provide the geocode models, encrypted dataset repository, optional BLoC state management, and a widget for displaying a lookup.

Classes

GeocodeCipher
Decrypts the encrypted geocode datasets bundled with the package.
GeocodeNumber
A region-number mapping loaded from the geocode dataset.
GeocodeNumberSuffix
A suffix mapping for the final segment of a Kataho code.
GeocodeRepository
Loads and resolves the encrypted geocode datasets bundled with the package.
GeocodeWord
One entry of geocode_words.json.
GeocodeWordKid
One entry of geocode_word_kids.json.
KatahoCode
A plus code translated into its human-readable Kataho form.
KatahoCodeBuilder
Builds a widget from the asynchronous result of a Kataho Code lookup.
KatahoCodeCubit
Coordinates asynchronous Plus Code lookups and exposes their state.
KatahoCodeFailure
The lookup itself failed — decryption error, missing asset, bad key.
KatahoCodeInitial
No plus code has been supplied yet.
KatahoCodeLoading
The geocode assets are being decrypted, or the lookup is running.
KatahoCodeState
State of a single plus-code -> Kataho-code translation.
KatahoCodeSuccess
The plus code resolved to a Kataho code.
KatahoCodeUnavailable
The input is well-formed but has no Kataho equivalent, e.g. it points outside the mapped area. Distinct from KatahoCodeFailure: nothing went wrong, there is simply no code to show.
PlusCodeArea
A decoded Plus Code area: its bounding box and its centre point.

Functions

plusCodeFromLatLng(double latitude, double longitude, {int codeLength = 11}) String
Creates a Google Open Location Code (Plus Code) from decimal coordinates.
plusCodeToArea(String code) PlusCodeArea?
Decodes a full Plus Code back to the area it names.