turkish_kit library
Turkish helpers for Dart and Flutter, in pure Dart:
- TurkishValidators and TurkishFormValidators: T.C. kimlik no, vergi kimlik no, TR IBAN and phone numbers; TurkishInputMask for as-you-type formatting.
- TurkishMoney and TurkishNumberWords: exact amounts, Turkish number
format and amounts in words (
Yalnız #...#). - TurkishText: Turkish upper/lower case, search normalization and alphabetical sorting.
- TurkishProvinces: the 81 provinces and 973 districts, offline.
- TurkishHolidays and TurkishBusinessCalendar: public holidays, bayrams and working days.
Classes
- TurkishBusinessCalendar
- Working-day rules: weekends, public holidays and your own exceptions.
- TurkishFormValidators
- Ready-made form field validators built on TurkishValidators.
- TurkishHoliday
- A public holiday in Turkey on a given date.
- TurkishHolidays
- Public holidays of Turkey under Law No. 2429 (Ulusal Bayram ve Genel Tatiller Hakkında Kanun).
- TurkishInputMask
- As-you-type formatting for Turkish numbers, without depending on Flutter.
- TurkishMoney
- An exact Turkish lira amount, stored as a whole number of kuruş (1 TL = 100 kuruş), so there are no floating-point errors.
- TurkishMoneyInputMask
-
As-you-type formatting for a Turkish money field:
1.234,56(with an optional₺suffix), without depending on Flutter. - TurkishNumberFormat
-
Formats and parses numbers in Turkish notation:
.groups thousands and,is the decimal separator (1.234.567,89). - TurkishNumberWords
- Converts whole numbers to Turkish words.
- TurkishProvince
- One of Turkey's 81 provinces (il) with its districts (ilçe).
- TurkishProvinces
- Lookup of the 81 provinces of Turkey and their districts, embedded in the package (no network needed).
- TurkishText
- Turkish-aware text helpers: casing, search normalization and sorting.
- TurkishValidationMessages
- Error messages used by TurkishFormValidators.
- TurkishValidators
- Pure functions that validate and normalize Turkish identifiers.
Enums
- TurkishHolidayKind
- Which holiday a TurkishHoliday is.
- TurkishPhoneType
- The kind of a Turkish phone number, see TurkishValidators.phoneType.
- TurkishRounding
- How amounts with more than two decimals are rounded to kuruş.
- TurkishWordCase
- Letter case of words produced by TurkishNumberWords and TurkishMoney.
Extensions
- TurkishStringExtension on String
- Turkish-aware versions of common String operations.
Typedefs
- TurkishEditValue = ({int selectionEnd, int selectionStart, String text})
-
A text with its selection, as an input formatter sees it. In Flutter this
is
TextEditingValue.textandTextEditingValue.selection. - TurkishFieldValidator = String? Function(String? value)
-
A form field validator: returns an error message, or
nullwhen the value is valid. - TurkishMaskResult = ({int cursor, String text})
- The result of TurkishInputMask.apply: the formatted text and where the cursor should be.