RunQueryResponse.fromJson constructor

RunQueryResponse.fromJson(
  1. Object? j
)

Implementation

factory RunQueryResponse.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return RunQueryResponse(
    transaction: switch (json['transaction']) {
      null => Uint8List(0),
      Object $1 => decodeBytes($1),
    },
    document: switch (json['document']) {
      null => null,
      Object $1 => Document.fromJson($1),
    },
    readTime: switch (json['readTime']) {
      null => null,
      Object $1 => Timestamp.fromJson($1),
    },
    skippedResults: switch (json['skippedResults']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    done: switch (json['done']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    explainMetrics: switch (json['explainMetrics']) {
      null => null,
      Object $1 => ExplainMetrics.fromJson($1),
    },
  );
}