isValidEmail static method
Implementation
static bool isValidEmail({
required String email,
}) {
try {
final regex = RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
return email.isEmpty || regex.hasMatch(email);
} catch (e) {
SdkLogger.error('Inappify email validation failed: ${e.runtimeType}');
return false;
}
}