queryCreditCard method

CreditCard queryCreditCard (
  1. String id
)

Implementation

CreditCard queryCreditCard(String id) {
  for (CreditCard card in creditCards) {
    if (card.id == id) {
      return card;
    }
  }
  return createCreditCard('Unknown', 'unknown');
}