normalizePlate function
Normalizes the Plate (or separate char part from number part)
Implementation
NormalizedPlate normalizePlate(String plate) {
// number part of the plate
String numbers;
// char part of the palte
String char;
char = _nonDigit
.allMatches(plate)
.map<String>((match) => match.group(0)!)
.join();
numbers = plate.replaceAll(_nonDigit, '');
return NormalizedPlate(numbers, char == '' ? null : char);
}