string method

String? string(
  1. String name
)

Returns a scalar query value, or null when it is absent.

Implementation

String? string(String name) {
  _readKeys.add(name);
  final values = _values[name];
  if (values == null || values.isEmpty) return null;
  if (values.length != 1) {
    throw ParameterFormatException(
      'Search parameter "$name" must contain one value.',
    );
  }
  return values.single;
}