πΊπΏ 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
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 & Bank BIN Lookup: detects Uzcard, Humo, Visa, Mastercard, UnionPay and Mir, identifies issuing banks (Kapitalbank, TBC, Anorbank, Ipak Yo'li, SQB, NBU, Uzum Bank, etc.) with brand colors, formats and masks card numbers, and validates them with Luhn.
- π¨ Fintech Card UI Widget (
UzCreditCardWidget): realistic, 3D flippable credit card widget with EMV chip, contactless wave symbol, auto-adapting bank gradients, and magnetic back stripe with CVV. - π Payment Deep Links: generates checkout web URLs and mobile app deep links for Click (
clickuz://), Payme (payme://), and Uzum Pay (uzumbank://). - π Regions & Districts Database (
UzRegions): complete administrative database covering all 14 regions and 200+ districts/cities for cascadeRegion -> Districtforms and search. - π Vehicle License Plates: validates and formats Uzbekistan individual (
01 A 777 AA) and legal entity (01 777 AAA) plates, auto-detects 14 administrative regions, and fixes accidental Cyrillic lookalike letters. - π Phones and operators: formats
+998 (xx) xxx-xx-xxand 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 and metadata parser extracting birth date and gender (
UzPinflValidator.parse). - Passport / ID card: formatting and pattern validation (
AA 1234567). - STIR (INN): 9-digit taxpayer number validation.
- JShShIR (PINFL): 14-digit checksum validation and metadata parser extracting birth date and gender (
- β¨οΈ Eight 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
// Issuing bank detection (Bank BIN Lookup)
final bank = UzCardUtils.detectBank('8600061234567890');
print(bank?.name); // "Kapitalbank"
print(bank?.brandColor); // 0xFFE31E24
print(UzBankUtils.getBankName('9860170000000000')); // "TBC Bank"
// 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)
// Parse PINFL metadata (birth date and gender for KYC / form autofill)
final info = UzPinflValidator.parse('30101901234569');
print(info?.gender); // UzPinflGender.male
print(info?.birthDate); // 1990-01-01 00:00:00.000
print(info?.age); // Current age in full years
// Passport / ID card
print(UzPassportUtils.format('aa1234567')); // "AA 1234567"
print(UzPassportUtils.isValid('AA 1234567')); // true
// STIR / INN, 9 digits
print(UzTinValidator.isValid('123456789')); // true
5. π Payment Gateways (Click, Payme, Uzum Pay)
Generate browser checkout URLs and mobile app deep links for seamless payments:
// Click web URL and deep link
final clickUrl = UzPayHelper.generateClickUrl(
serviceId: 1234,
merchantId: 5678,
amount: 50000,
transactionParam: 'order_1',
);
// "https://my.click.uz/services/pay?service_id=1234&merchant_id=5678&amount=50000&transaction_param=order_1"
// Payme web checkout (auto encodes to Base64 and converts so'm to tiyin)
final paymeUrl = UzPayHelper.generatePaymeUrl(
merchantId: 'merchant_123',
amount: 50000,
orderId: 'order_1',
);
// "https://checkout.paycom.uz/..."
// Uzum Pay
final uzum = UzPayHelper.uzumPay(
serviceId: 999,
amount: 50000,
orderId: 'order_1',
);
print(uzum.webUrl); // "https://www.uzumbank.uz/open-service?..."
print(uzum.deepLink); // "uzumbank://pay?..."
6. π Vehicle License Plates
Validate, format, and detect administrative regions for Uzbekistan vehicle plates (01 A 777 AA or 01 777 AAA):
// Formatting
print(UzCarPlateUtils.format('01a777aa')); // "01 A 777 AA"
print(UzCarPlateUtils.format('01777aaa')); // "01 777 AAA"
// Plate type
print(UzCarPlateUtils.detectType('01 A 777 AA')); // UzCarPlateType.individual
print(UzCarPlateUtils.detectType('01 777 AAA')); // UzCarPlateType.legalEntity
// Administrative region detection
final region = UzCarPlateUtils.getRegion('01 A 777 AA');
print(region?.nameUz); // "Toshkent shahri"
print(region?.code); // "01"
// Validation (auto fixes accidental Cyrillic lookalikes on mobile keyboards)
print(UzCarPlateUtils.isValid('01 A 777 AA')); // true
print(UzCarPlateUtils.isValid('01 Π 777 ΠΠ')); // true (Cyrillic 'Π' handled)
7. π Regions and Districts Database
Complete administrative database of all 14 regions and 200+ districts/cities for cascade Region -> District forms and search:
// All 14 administrative regions
for (final region in UzRegions.all) {
print('${region.code}: ${region.nameUz} (${region.districts.length} districts)');
}
// Get region by code
final tashkent = UzRegions.getByCode('01');
print(tashkent?.nameUz); // "Toshkent shahri"
// Get districts for a region
final districts = UzRegions.getDistricts('tashkent_city');
for (final d in districts) {
print(d.nameUz); // "Yunusobod tumani", "Chilonzor tumani", etc.
}
// Search districts or regions
final search = UzRegions.searchDistricts('Chilonzor');
print(search.first.nameUz); // "Chilonzor tumani"
8. π¨ Fintech Credit Card UI Widget
Interactive, 3D flippable credit card widget for your Flutter apps supporting Visa, Mastercard, Uzcard, and Humo:
UzCreditCardWidget(
cardNumber: '4169 7312 3456 7890', // Visa (Kapitalbank)
expiryDate: '12/28',
cvv: '452', // 3-digit security code (displayed on back)
cardHolderName: 'IBROHIM QOBILOV',
enableFlip: true, // Flips to back side on tap with 3D animation
)
- Visa and Mastercard: Classic italic Visa branding and authentic overlapping dual-circle Mastercard logo.
- Domestic Cards: Official Uzcard diamond badge and Humo wings styling.
- 3-Digit CVV / CVC: Displayed on the signature panel on the back side of the card.
- Bank Brand Gradients: Automatically adapts to Kapitalbank, TBC, Anorbank, Uzum Bank, Ipak Yo'li, etc.
9. π· Bank Card Scanner (UzCardScanner & showUzCardScanner)
Extract 16-digit card numbers, expiry dates (MM/YY), and 3-digit CVV / CVC codes from OCR, camera feeds, or text:
// Launch the ready-to-use laser animated card scanner modal:
final scanned = await showUzCardScanner(context);
if (scanned != null) {
print(scanned.cardNumber); // "4169731234567890"
print(scanned.expiryDate); // "12/28"
print(scanned.cvv); // "452" (3-digit CVV)
print(scanned.cardType); // UzCardType.visa
}
// Or parse from raw OCR text:
final card = UzCardScanner.parse('''
4169 7312 3456 7890
VALID THRU: 12/28
CVV: 452
''');
print(card?.cardNumber); // "4169731234567890"
print(card?.cvv); // "452"
10. π‘ NFC Bank Card Reader (UzEmvNfcParser)
Instantly parse contactless bank cards (Humo, Uzcard NFC, Visa PayWave, Mastercard PayPass) via device NFC:
// Parse EMV Track 2 (Tag 57) or APDU Hex response:
final nfcCard = UzEmvNfcParser.parseTrack2('9860171234567890D281220100000000');
print(nfcCard?.formattedCardNumber); // "9860 1712 3456 7890"
print(nfcCard?.expiryDate); // "12/28"
print(nfcCard?.cardType); // UzCardType.humo
print(nfcCard?.bank?.name); // "TBC Bank"
β οΈ Security note: Under global EMV / PCI-DSS compliance, CVV security codes are NEVER stored on or transmitted via NFC chips. Uzcard and Humo cards do not use CVV at all (they rely on SMS OTP). For Visa and Mastercard, CVV is entered manually by the user or scanned via camera.
β¨οΈ 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 |
UzCarPlateInputFormatter() |
01a777aa |
01 A 777 AA |
π± 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.
Libraries
- uz_kit
- Complete Flutter & Dart utility kit for Uzbekistan fintech, localization, and applications.