Commit constructor

  1. @jsonSerializable
const Commit({
  1. required List<RepoOp> ops,
  2. @JsonKey(name: 'repo') required String did,
  3. @JsonKey(name: 'seq') required int cursor,
  4. required String rev,
  5. String? since,
  6. @JsonKey(name: 'tooBig') @Default(false) bool isTooBig,
  7. @JsonKey(name: 'time') required DateTime createdAt,
})

Implementation

@jsonSerializable
const factory Commit({
  required List<RepoOp> ops,
  @JsonKey(name: 'repo') required String did,
  @JsonKey(name: 'seq') required int cursor,

  /// The rev of the emitted commit.
  required String rev,

  /// The rev of the last emitted commit from this repo.
  String? since,
  @JsonKey(name: 'tooBig') @Default(false) bool isTooBig,
  @JsonKey(name: 'time') required DateTime createdAt,
}) = _Commit;