has method

  1. @override
bool has(
  1. String key
)
override

Check if input is present

req.has('email')

'' and null give false, like filled. With CoreFlags.hasKeyOnly it only checks that the key is there, like exists.

Implementation

@override
bool has(String key) {
  if (Dox().flags.hasKeyOnly) return exists(key);
  dynamic val = _plainOr(key);
  if (identical(val, _absent)) val = null;
  if (val == null) {
    return false;
  }
  return val.toString().isNotEmpty ? true : false;
}