StreamRevision.checked constructor
StreamRevision.checked(
- int value
Constructs a new StreamRevision from given value.
Implementation
factory StreamRevision.checked(int value) {
if (value == -1) {
return none;
}
final version = Int64(value);
if (version > Int64.MAX_VALUE && version != Int64.MAX_VALUE) {
throw ArgumentOutOfRangeException.fromCause(GrpcError.outOfRange(
'Revision value can not be large than Int64.MAX_VALUE',
));
}
return StreamRevision._(version);
}