withValue<T> function

RequestMiddleware withValue <T>(
  1. {String key,
  2. T value}
)

Implementation

RequestMiddleware withValue<T>({String key, T value}) {
  return (Request req) {
    if (key == null || value == null) return req;
    req.context.set(key, value);
    return req;
  };
}