diff --git a/veilid-flutter/lib/routing_context.dart b/veilid-flutter/lib/routing_context.dart index 84da321f..cf6e8081 100644 --- a/veilid-flutter/lib/routing_context.dart +++ b/veilid-flutter/lib/routing_context.dart @@ -128,8 +128,7 @@ extension DHTRecordDescriptorExt on DHTRecordDescriptor { @freezed class ValueSubkeyRange with _$ValueSubkeyRange { - @Assert('low < 0 || low > high', 'low out of range') - @Assert('high < 0', 'high out of range') + @Assert('low >= 0 && low <= high', 'range is invalid') const factory ValueSubkeyRange({ required int low, required int high, diff --git a/veilid-flutter/lib/routing_context.freezed.dart b/veilid-flutter/lib/routing_context.freezed.dart index 30d05770..c5114290 100644 --- a/veilid-flutter/lib/routing_context.freezed.dart +++ b/veilid-flutter/lib/routing_context.freezed.dart @@ -903,8 +903,7 @@ class __$$ValueSubkeyRangeImplCopyWithImpl<$Res> @JsonSerializable() class _$ValueSubkeyRangeImpl implements _ValueSubkeyRange { const _$ValueSubkeyRangeImpl({required this.low, required this.high}) - : assert(low < 0 || low > high, 'low out of range'), - assert(high < 0, 'high out of range'); + : assert(low >= 0 && low <= high, 'range is invalid'); factory _$ValueSubkeyRangeImpl.fromJson(Map json) => _$$ValueSubkeyRangeImplFromJson(json);