emailOrUrl static method

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

Check if the value is a valid email address or a url.

Implementation

static String? emailOrUrl(String? value, {String? message}) =>
    value == null || value.isEmpty || validations.isEmail(value) || validations.isURL(value) ? null : message ?? 'Please enter a valid email or URL';