RequestOptions.fromJson constructor

RequestOptions.fromJson(
  1. Object? j
)

Implementation

factory RequestOptions.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return RequestOptions(
    requestTags: switch (json['requestTags']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) decodeString(i)],
      _ => throw const FormatException('"requestTags" is not a list'),
    },
  );
}