StreamMetadata constructor
StreamMetadata({
- StreamAcl? acl,
- dynamic custom,
- Duration? maxAge,
- int? maxCount,
- Duration? cacheControl,
- StreamPosition? truncateBefore,
Implementation
StreamMetadata({
this.acl,
this.custom,
this.maxAge,
this.maxCount,
this.cacheControl,
this.truncateBefore,
}) {
if (maxCount != null && maxCount! <= 0) {
throw ArgumentOutOfRangeException.fromCause(GrpcError.outOfRange(
'maxCount value must be larger than zero',
));
}
if (maxAge != null && maxAge! <= Duration.zero) {
throw ArgumentOutOfRangeException.fromCause(GrpcError.outOfRange(
'maxAge value must be larger than zero',
));
}
if (cacheControl != null && cacheControl! <= Duration.zero) {
throw ArgumentOutOfRangeException.fromCause(GrpcError.outOfRange(
'cacheControl value must be larger than zero',
));
}
}