toMail static method

String? toMail(
  1. String prefix,
  2. String suffix, [
  3. String type = "com"
])

Converts prefix, suffix, and type to a formatted email address.

Example: ('john.doe', 'example', 'com') -> 'john.doe@example.com'

Implementation

static String? toMail(
  String prefix,
  String suffix, [
  String type = "com",
]) {
  final String mail = "$prefix@$suffix.$type";
  return AuthValidator.isValidEmail(mail) ? mail : null;
}