formatters/credit_card_number_input_formatter library
Functions
-
formatAsCardNumber(
String cardNumber) → String -
getCardSystemData(
String cardNumber) → CardSystemData? -
isCardNumberValid(
{required String cardNumber, bool checkLength = false, bool useLuhnAlgo = true}) → bool -
useLuhnAlgo
validates the number using the Luhn algorithm -
isCardValidNumber(
String cardNumber, {bool checkLength = false}) → bool - checks not only for a length and characters but also for card system code. If it's not found the succession of numbers will not be marked as a valid card number