Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Merculiar committed Nov 26, 2024
1 parent d85e98e commit 5298db3
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ enum DocumentType {

extension DocumentTypeExtension on DocumentType {
IdType toIdType() => switch (this) {
DocumentType.bvn ||
DocumentType.nin ||
DocumentType.ninV2 ||
DocumentType.ninSlip => IdType.other,
DocumentType.driversLicense => IdType.driverLicense,
DocumentType.voterId => IdType.voterId,
};
DocumentType.bvn ||
DocumentType.nin ||
DocumentType.ninV2 ||
DocumentType.ninSlip =>
IdType.other,
DocumentType.driversLicense => IdType.driverLicense,
DocumentType.voterId => IdType.voterId,
};
}

extension IdTypeExtension on IdType {
DocumentType? toDocumentType() => switch (this) {
IdType.driverLicense => DocumentType.driversLicense,
IdType.voterId => DocumentType.voterId,
// ignore: avoid-wildcard-cases-with-enums, check if needed
_ => null,
};
IdType.driverLicense => DocumentType.driversLicense,
IdType.voterId => DocumentType.voterId,
// ignore: avoid-wildcard-cases-with-enums, check if needed
_ => null,
};
}

0 comments on commit 5298db3

Please sign in to comment.