maxLength method Null safety
Check if the value's length is less than or equal to the given maximum length.
Implementation
static String? maxLength(String? value, {String? message, required int length}) =>
value == null || value.isEmpty || value.length <= length ? null : message ?? 'Please enter a valid length';