emailOrPhone method Null safety

String? emailOrPhone(
  1. String? value,
  2. {String? message}
)

Check if the value is a valid email address or a phone number.

Implementation

static String? emailOrPhone(String? value, {String? message}) => value == null || value.isEmpty || validations.isEmail(value) || validations.isNumeric(value)
    ? null
    : message ?? 'Please enter a valid email or phone number';