static bool isValidEmail(String? email, [RegExp? pattern]) { return email != null && email.isNotEmpty && (pattern ?? Patterns.email).hasMatch(email); }