CodiceFiscale constructor

CodiceFiscale({
  1. required String firstName,
  2. required String lastName,
  3. required City? birthCity,
  4. required CodiceFiscaleGender gender,
  5. required DateTime birthDate,
})

Implementation

CodiceFiscale(
    {required this.firstName,
    required this.lastName,
    required this.birthCity,
    required this.gender,
    required this.birthDate})
    : assert(firstName.isNotEmpty),
      assert(lastName.isNotEmpty) {
  _fiscalCode = '${lastNameCode()}${firstNameCode()}${birthDateCode()}${birthPlaceCode()}${getCheckCode()}';
}