alphanumeric method Null safety

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

Checks if the value is alphanumeric, i.e., contains only letters and numbers.

Implementation

static String? alphanumeric(String? value, {String? message}) =>
    value == null || value.isEmpty || validations.isAlphanumeric(value) ? null : message ?? 'Please enter only alphabets and numbers';