checkDigit method

  1. @override
int checkDigit(
  1. String data
)
override

Computes the check digit from data.

Implementation

@override
int checkDigit(String data) {
  if (data.length != 9) {
    throw ArgumentError('Must not be null and must contain 9 digits');
  }

  return (11 - (_compute(data) % 11)) % 11;
}