getBrandByCreditCardNumber method
Implementation
String? getBrandByCreditCardNumber(String creditCardNumber) {
creditCardNumber = creditCardNumber.replaceAll(RegExp(r"[^\d]"), "");
for (var brand in _brands) {
if (RegExp(brand.brand).hasMatch(creditCardNumber)) return brand.name;
}
return null;
}