TypedQueryParameter<T> constructor

const TypedQueryParameter<T>({
  1. String? name,
  2. QueryParameterEncoder<T>? encoder,
  3. QueryParameterDecoder<T>? decoder,
  4. bool compare(
    1. T,
    2. T
    )?,
})

Annotation to override the URI name for a route parameter.

Implementation

const TypedQueryParameter({this.name, this.encoder, this.decoder, this.compare})
  : assert(
      (encoder == null) == (decoder == null),
      'encoder and decoder must both be provided together',
    ),
    assert(
      compare == null || encoder != null,
      'compare function requires an encoder to be provided',
    );