uz_kit 0.1.1 copy "uz_kit: ^0.1.1" to clipboard
uz_kit: ^0.1.1 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'zbek tilidagi to'liq qo'llanmani shu yerda o'qish (Bosing / Click to Expand)

πŸ‡ΊπŸ‡Ώ UzKit β€” O'zbekcha Tezkor Qo'llanma #

O'zbekistondagi Fintech, Bank ilovalari, E-commerce, hisob-fakturalar va mobil ilovalar uchun maxsus yaratilgan Flutter & Dart kutubxonasi.

πŸš€ Tezkor Misollar:

import 'package:uz_kit/uz_kit.dart';

// 1. Karta turini aniqlash (Uzcard, Humo, Visa...)
UzCardType type = UzCardUtils.getCardType('8600123456789012');

// 2. Telefon raqamni formatlash va operatorni bilish
String phone = UzPhoneUtils.formatPhoneNumber('998901234567'); // "+998 (90) 123-45-67"
UzOperator op = UzPhoneUtils.getOperator('998901234567'); // Beeline

// 3. So'm summasini so'z bilan yozish (Lotin / Kirill)
String words = UzMoneyWords.toWords(1450000); 
// "bir million to'rt yuz ellik ming so'm"

// 4. JShShIR (PINFL) va Pasport tekshirish
bool isValidPinfl = UzIdentityUtils.isValidPinfl('32109876543210');

Batafsil to'liq hujjat: πŸ‘‰ README_UZ.md


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

Pub Version Pub Points GitHub Stars License: MIT Flutter


A modern, high-performance Flutter and Dart utility toolkit specifically designed for Fintech, Banking, E-commerce, Invoicing, and Mobile Applications in Uzbekistan.


⚑ Why UzKit? #

Building applications for the Uzbekistan market requires dealing with local payment systems, phone formatting, invoice receipt generation, and legal document validations. UzKit provides a clean, battle-tested, 100% null-safe suite of utilities so you never have to reinvent the wheel.

  • πŸ’³ Bank Card Recognition: Instantly detects Uzcard, Humo, Visa, Mastercard, UnionPay, and Mir cards with auto-formatting, masking, and Luhn checksum validation.
  • πŸ“ž Phone & Mobile Operator: Formats +998 (xx) xxx-xx-xx and detects Beeline, Ucell, Mobiuz, Uztelecom, Humans, and Perfectum by network code.
  • πŸ’° Money to Words in Uzbek: Converts numerical amounts up to trillions into written Uzbek words ("bir million to'rt yuz ellik ming so'm") in both Latin and Cyrillic alphabets with tiyin support.
  • πŸ†” Official Identity Verification:
    • JShShIR (PINFL): 14-digit official State Tax Committee checksum verification.
    • Passport & ID-Cards: Formatting and pattern validation (AA 1234567).
    • STIR (INN): 9-digit Taxpayer Identification Number validation.

πŸ“¦ Installation #

Add uz_kit to your pubspec.yaml file:

dependencies:
  uz_kit: ^0.1.0

Or install it via terminal:

flutter pub add uz_kit

Then import the library in your Dart code:

import 'package:uz_kit/uz_kit.dart';

πŸ“– Comprehensive Usage Guide #

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

// 1. Automatic Card Type Detection
final cardType = UzCardUtils.detectType('8600123456789012');
print(cardType.displayName); // "Uzcard"
print(cardType.isLocal);     // true
print(cardType.brandColor);  // 0xFF005696

// 2. Format with spaces
final formatted = UzCardUtils.format('9860123456789012');
print(formatted); // "9860 1234 5678 9012"

// 3. Privacy Masking
final masked = UzCardUtils.mask('8600123456789012');
print(masked); // "8600 **** **** 9012"

// 4. Expiry Date & Luhn Checksum
final isLuhnValid = UzCardUtils.isValidLuhn('8600123456789012');
final isExpiryValid = UzCardUtils.isExpiryValid('12/28');

// 5. Use in TextField Formatter
TextField(
  keyboardType: TextInputType.number,
  inputFormatters: [UzCardNumberFormatter()],
  decoration: 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 & Mobile Operators #

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

// 2. Format & Normalization
final formatted = UzPhoneUtils.format('901234567');
print(formatted); // "+998 (90) 123-45-67"

final normalized = UzPhoneUtils.normalize('+998 (90) 123-45-67');
print(normalized); // "998901234567"

// 3. TextField Formatter
TextField(
  keyboardType: TextInputType.phone,
  inputFormatters: [UzPhoneInputFormatter()],
  decoration: 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. πŸ’° Amount to Words in Uzbek (Kvitansiya & Cheklar) #

Convert any numerical amount into grammatically correct written words in Uzbek:

// Latin Alphabet
final textLatin = UzMoneyToWords.convert(1450000);
print(textLatin); 
// Output: "bir million to'rt yuz ellik ming so'm"

// With Tiyin
final withTiyin = UzMoneyToWords.convert(2500000.50);
print(withTiyin); 
// Output: "ikki million besh yuz ming so'm 50 tiyin"

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

// Currency Amount Formatter with Spaces
final formattedMoney = UzMoneyFormatter.format(1250000);
print(formattedMoney); // "1 250 000 so'm"

4. πŸ†” JShShIR (PINFL) & Passport Verification #

// 1. JShShIR (PINFL - 14 Digits) Checksum Validation
final isPinflValid = UzPinflValidator.isValid('30101901234567');
print(isPinflValid); // true/false based on official STC algorithm

// 2. Passport / ID-Card Formatting & Validation
final formattedPassport = UzPassportUtils.format('aa1234567');
print(formattedPassport); // "AA 1234567"

final isPassportValid = UzPassportUtils.isValid('AA 1234567');
print(isPassportValid); // true

// 3. STIR / INN (9 Digits) Validation
final isTinValid = UzTinValidator.isValid('123456789');

πŸ“± Interactive Demo Application #

Run the bundled Flutter demo app in the example/ directory:

cd example
flutter run

πŸ§ͺ Testing & Quality Assurance #

All features are covered by comprehensive unit tests:

flutter test --coverage

Output:

00:00 +10: All tests passed!

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

Created with ❀️ by Ibrohim Qobilov.

Feedback, feature suggestions, and pull requests are welcome!


πŸ“„ License #

This package is open-sourced under the MIT License.

1
likes
160
points
--
downloads

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