type property
String?
type
Implementation
String? get type {
// If type is empty and the number isn't empty
if (StringUtils.isEmpty(_type)) {
if (!StringUtils.isEmpty(number)) {
for (var cardType in cardTypes) {
if (cardType.hasFullMatch(number)) {
return cardType.toString();
}
}
}
return CardType.unknown;
}
return _type;
}
Implementation
set type(String? value) => _type = value;