πΊπΏ 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
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-xxand 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.
Libraries
- uz_kit
- Complete Flutter & Dart utility kit for Uzbekistan fintech, localization, and applications.