CommitRequest.fromJson constructor
CommitRequest.fromJson(
- Object? j
Implementation
factory CommitRequest.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return CommitRequest(
database: switch (json['database']) {
null => '',
Object $1 => decodeString($1),
},
writes: switch (json['writes']) {
null => [],
List<Object?> $1 => [for (final i in $1) Write.fromJson(i)],
_ => throw const FormatException('"writes" is not a list'),
},
transaction: switch (json['transaction']) {
null => Uint8List(0),
Object $1 => decodeBytes($1),
},
);
}