Skip to main content

uz_kit 0.1.2 copy "uz_kit: ^0.1.2" to clipboard
uz_kit: ^0.1.2 copied to clipboard

Complete Flutter & Dart utility kit for Uzbekistan. Detects Uzcard/Humo cards, mobile operators, formats money to Uzbek words, phone numbers, and validates PINFL/Passports.

UzKit Flutter Package Banner

O'zbekcha Hujjatlar English Documentation

πŸ‡ΊπŸ‡Ώ O'zbekcha tezkor qo'llanma (bosing / click to expand)

πŸ‡ΊπŸ‡Ώ UzKit β€” O'zbekcha tezkor qo'llanma #

O'zbekistondagi fintech, bank ilovalari, e-commerce, hisob-fakturalar va mobil ilovalar uchun Flutter & Dart kutubxonasi.

import 'package:uz_kit/uz_kit.dart';

// 1. Karta turini aniqlash (Uzcard, Humo, Visa...)
final card = UzCardUtils.detectType('8600123456789012');
print(card.displayName); // "Uzcard"

// 2. Telefon raqamni formatlash va operatorni aniqlash
print(UzPhoneUtils.format('998901234567')); // "+998 (90) 123-45-67"
print(UzPhoneUtils.detectOperator('998901234567').displayName); // "Beeline"

// 3. So'm summasini so'z bilan yozish (lotin / kirill)
print(UzMoneyToWords.convert(1450000));
// "bir million to'rt yuz ellik ming so'm"

// 4. JShShIR (PINFL) va pasportni tekshirish
print(UzPinflValidator.isValid('30101901234569')); // true
print(UzPassportUtils.isValid('AA 1234567'));      // true

To'liq o'zbekcha hujjat: πŸ‘‰ README_UZ.md


πŸ‡ΊπŸ‡Ώ UzKit β€” The Flutter & Dart Toolkit for Uzbekistan #

Pub Version Pub Points GitHub Stars License: MIT Flutter

A lightweight, null-safe Flutter and Dart toolkit for fintech, banking, e-commerce, invoicing and mobile apps in Uzbekistan. No third-party dependencies, only Flutter itself.

⭐ If UzKit saves you time, please star the repo on GitHub. It helps other Uzbek developers find it.


⚑ Why UzKit? #

Apps for the Uzbekistan market keep re-implementing the same things: local card systems, +998 phone formatting, amounts written out in words on receipts, and PINFL / passport checks. UzKit puts them in one small, tested package.

  • πŸ’³ Bank cards: detects Uzcard, Humo, Visa, Mastercard, UnionPay and Mir, formats and masks card numbers, and validates them with the Luhn checksum.
  • πŸ“ž Phones and operators: formats +998 (xx) xxx-xx-xx and detects Beeline, Ucell, Mobiuz, Uztelecom, Humans and Perfectum by network code.
  • πŸ’° Amounts in words: writes amounts up to trillions in Uzbek ("bir million to'rt yuz ellik ming so'm"), in Latin or Cyrillic, with tiyin.
  • πŸ†” Identity documents:
    • JShShIR (PINFL): 14-digit checksum validation.
    • Passport / ID card: formatting and pattern validation (AA 1234567).
    • STIR (INN): 9-digit taxpayer number validation.
  • ⌨️ Seven ready-made TextInputFormatters that format input while the user types.

πŸ“¦ Installation #

flutter pub add uz_kit

Or add it to your pubspec.yaml manually:

dependencies:
  uz_kit: ^0.1.2

Then import it:

import 'package:uz_kit/uz_kit.dart';

πŸ“– Usage #

1. πŸ’³ Bank cards (Uzcard, Humo, Visa, Mastercard) #

// Card type detection
final cardType = UzCardUtils.detectType('8600123456789012');
print(cardType.displayName); // "Uzcard"
print(cardType.isLocal);     // true
final color = Color(cardType.brandColor); // brand color, 0xFF005696

// Formatting and masking
print(UzCardUtils.format('9860123456789012')); // "9860 1234 5678 9012"
print(UzCardUtils.mask('8600123456789012'));   // "8600 **** **** 9012"

// Validation
print(UzCardUtils.isValidLength('8600 1234 5678 9012')); // true
print(UzCardUtils.isValidLuhn('8600123456789012'));      // true

// Expiry date
print(UzCardUtils.formatExpiry('1228'));  // "12/28"
print(UzCardUtils.isExpiryValid('12/28')); // true until the card expires

// In a TextField
TextField(
  keyboardType: TextInputType.number,
  inputFormatters: [UzCardNumberFormatter()],
  decoration: const InputDecoration(
    labelText: 'Card number',
    hintText: '8600 0000 0000 0000',
  ),
);

Supported card BIN ranges

Card type BIN prefixes Domestic / International
πŸ’³ Uzcard 8600, 5614 Domestic (Uzbekistan)
πŸ’³ Humo 9860 Domestic (Uzbekistan)
πŸ’³ Visa 4... International
πŸ’³ Mastercard 51-55, 2221-2720 International
πŸ’³ UnionPay 62... International
πŸ’³ Mir 2200-2204 International

2. πŸ“ž Phone numbers and mobile operators #

// Operator detection
final operator = UzPhoneUtils.detectOperator('+998 90 123 45 67');
print(operator.displayName); // "Beeline"
print(operator.companyName); // "Unitel LLC"

// Formatting and normalization
print(UzPhoneUtils.format('901234567')); // "+998 (90) 123-45-67"
print(UzPhoneUtils.format('998901234567', withCountryCode: false)); // "(90) 123-45-67"
print(UzPhoneUtils.normalize('+998 (90) 123-45-67')); // "998901234567"

// Validation (12 digits with 998 and a known operator code)
print(UzPhoneUtils.isValid('+998 93 123 45 67')); // true (Ucell)
print(UzPhoneUtils.isValid('+998 92 123 45 67')); // false (unknown code)

// In a TextField
TextField(
  keyboardType: TextInputType.phone,
  inputFormatters: [UzPhoneInputFormatter()],
  decoration: const InputDecoration(
    labelText: 'Phone number',
    hintText: '+998 (90) 123-45-67',
  ),
);

Supported mobile operators

Operator Network codes Company
🟑 Beeline 90, 91 Unitel LLC
🟣 Ucell 93, 94, 50 Coscom LLC
πŸ”΄ Mobiuz 97, 88 UMS LLC
πŸ”΅ Uztelecom 99, 95, 77 Uzbektelecom JSC
🟑 Humans 33 Humans LLC
πŸ”΄ Perfectum 98 RWC LLC

3. πŸ’° Amounts in words (receipts and invoices) #

// Latin script
print(UzMoneyToWords.convert(1450000));
// "bir million to'rt yuz ellik ming so'm"

// With tiyin
print(UzMoneyToWords.convert(2500000.50));
// "ikki million besh yuz ming so'm 50 tiyin"

// Cyrillic script
print(UzMoneyToWords.convert(1450000, script: UzScript.cyrillic));
// "Π±ΠΈΡ€ ΠΌΠΈΠ»Π»ΠΈΠΎΠ½ Ρ‚ΡžΡ€Ρ‚ юз эллик ΠΌΠΈΠ½Π³ сўм"

// Without the currency name
print(UzMoneyToWords.convert(125, withCurrency: false));
// "bir yuz yigirma besh"

// Amount formatting with thousand separators
print(UzMoneyFormatter.format(1250000)); // "1 250 000 so'm"
print(UzMoneyFormatter.format(99.9, symbol: r'$', symbolAtEnd: false, decimalDigits: 2));
// "$ 99.90"

4. πŸ†” JShShIR (PINFL), passport and STIR (INN) #

// JShShIR (PINFL), 14 digits with checksum
print(UzPinflValidator.isValid('30101901234569')); // true
print(UzPinflValidator.isValid('30101901234567')); // false (wrong check digit)

// Passport / ID card
print(UzPassportUtils.format('aa1234567'));   // "AA 1234567"
print(UzPassportUtils.isValid('AA 1234567')); // true

// STIR / INN, 9 digits
print(UzTinValidator.isValid('123456789')); // true

⌨️ Input formatters #

Drop any of these into TextField.inputFormatters:

Formatter User types Field shows
UzCardNumberFormatter() 8600123456789012 8600 1234 5678 9012
UzCardExpiryFormatter() 1228 12/28
UzPhoneInputFormatter() 901234567 +998 (90) 123-45-67
UzMoneyInputFormatter() 1500000 1 500 000
UzPassportInputFormatter() aa1234567 AA 1234567
UzPinflInputFormatter() digits first 14 digits only
UzTinInputFormatter() digits first 9 digits only

πŸ“± Demo app #

The example/ directory has a Flutter demo with every feature:

cd example
flutter run

πŸ§ͺ Tests #

Every example in this README is covered by a unit test (test/readme_examples_test.dart), so the docs stay in sync with the code:

flutter test

🀝 Contributing #

Bug reports, feature ideas and pull requests are welcome:

If a new operator code or card BIN appears in Uzbekistan, an issue or PR with the source is the fastest way to get it added.

⭐ Found UzKit useful? Give it a star on GitHub and a πŸ‘ on pub.dev.


πŸ‘¨β€πŸ’» Author #

Created by Ibrohim Qobilov.

πŸ“„ License #

Released under the MIT License.

2
likes
160
points
537
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Complete Flutter & Dart utility kit for Uzbekistan. Detects Uzcard/Humo cards, mobile operators, formats money to Uzbek words, phone numbers, and validates PINFL/Passports.

Repository (GitHub)
View/report issues

Topics

#uzbekistan #fintech #uzcard #formatters #validation

License

MIT (license)

Dependencies

flutter

More

Packages that depend on uz_kit