notNull static method

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

Check if the value is not null.

Implementation

static String? notNull(String? value, {String? message}) => value == null ? message ?? 'This field is required to have a value' : null;