HttpRouteMatch.fromJson constructor

HttpRouteMatch.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory HttpRouteMatch.fromJson(Map<String, dynamic> json) {
  return HttpRouteMatch(
    prefix: json['prefix'] as String,
    headers: (json['headers'] as List?)
        ?.whereNotNull()
        .map((e) => HttpRouteHeader.fromJson(e as Map<String, dynamic>))
        .toList(),
    method: (json['method'] as String?)?.toHttpMethod(),
    scheme: (json['scheme'] as String?)?.toHttpScheme(),
  );
}