india_pincode_finder 1.0.0 copy "india_pincode_finder: ^1.0.0" to clipboard
india_pincode_finder: ^1.0.0 copied to clipboard

Find detailed Indian address information (state, district, taluka) from a 6-digit PIN code. Offline, no API calls. Ideal for logistics, KYC, e-commerce, and mapping.

🇮🇳 india_pincode_finder #

India Pincode Finder

Find detailed Indian address information (state, district, taluka/block) from a valid 6-digit PIN code — fully offline, no API calls. Ideal for logistics, address validation, fintech onboarding (KYC), e-commerce, and mapping.

Install #

dependencies:
  india_pincode_finder: ^1.0.0

Usage #

Call init() once (e.g. in main), then look up synchronously anywhere:

import 'package:india_pincode_finder/india_pincode_finder.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await IndiaPincodeFinder.init();

  final address = IndiaPincodeFinder.pinToAddress(411001);
  // PincodeData(pincode: 411001, district: Pune, block: Pune City, state: Maharashtra)

  IndiaPincodeFinder.pinToState(411001);    // 'Maharashtra'
  IndiaPincodeFinder.pinToDistrict(411001); // 'Pune'
  IndiaPincodeFinder.pinToTaluka(411001);   // 'Pune City'

  IndiaPincodeFinder.pinToAddress(999999);  // null (not found)
}

API #

Member Returns
Future<void> init() Loads & caches the dataset once. Idempotent.
bool get isInitialized Whether data is loaded.
PincodeData? pinToAddress(int pincode) Full record, or null.
String? pinToState(int pincode) State, or null.
String? pinToDistrict(int pincode) District, or null.
String? pinToTaluka(int pincode) Taluka/block, or null.
void clearCache() Clears the cache.

Calling a lookup before init() throws a StateError. Invalid or unknown PIN codes return null.

Notes #

  • ~1,068 records have a block value of "NA" in the source data; these are returned verbatim.
  • Dataset is for educational use, sourced from public databases.

Credits #

This is the Flutter/Dart port of the IndiaPincodeFinder project, which also provides Python (PyPI) and Node.js (npm) packages.

The PIN code dataset and original implementation are by @IntegerAlex (Akshat Kotpalliwar) and @Aniket-Dhumal (Aniket Dhumal), released under GPL-3.0. This port preserves that license and attribution.

License #

GPL-3.0-only. For commercial use without GPL compliance, contact the original authors. See the LICENSE file for details.

0
likes
160
points
--
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Find detailed Indian address information (state, district, taluka) from a 6-digit PIN code. Offline, no API calls. Ideal for logistics, KYC, e-commerce, and mapping.

Repository (GitHub)
View/report issues

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on india_pincode_finder