HttpHeader.fromJson constructor

HttpHeader.fromJson(
  1. Object? j
)

Implementation

factory HttpHeader.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return HttpHeader(
    key: switch (json['key']) {
      null => '',
      Object $1 => decodeString($1),
    },
    value: switch (json['value']) {
      null => '',
      Object $1 => decodeString($1),
    },
  );
}