CardProvider constructor

CardProvider({
  1. required CardProviderID id,
  2. required int cardLength,
  3. required int cvcLength,
  4. List<int>? innValidNums,
  5. List<Range>? innValidRanges,
})

Implementation

CardProvider(
    {required this.id,
    required this.cardLength,
    required this.cvcLength,
    this.innValidNums,
    this.innValidRanges}) {
  // Must provide one or the other
  assert(innValidNums != null || innValidRanges != null);
  // Do not provide empty list of valid nums
  assert(innValidNums == null || innValidNums!.isNotEmpty);
}