Skip to content

Commit b20b3bd

Browse files
committed
Prepare for 4.0.0-beta.
1 parent 86a2ee9 commit b20b3bd

10 files changed

+14
-27
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
1010
[file an issue]: https://github.com/matanlurey/binary.dart/issues
1111

12+
## 4.0.0-beta
13+
14+
- Update Dart SDK to `^3.5.0`.
15+
1216
## 4.0.0-alpha+7
1317

1418
- Added `<Int>.lsb`.

README.md

-23
Original file line numberDiff line numberDiff line change
@@ -115,29 +115,6 @@ Uint8(1).uncheckedAdd(Uint8(3));
115115
Uint8(255).uncheckedAdd(Uint8(1));
116116
```
117117

118-
### Bit Patterns
119-
120-
There is also builder-type API for generating patterns to match against bits.
121-
The easiest way to explain this API is it is _like_ `RegExp`, except for
122-
matching and capturing components of bits:
123-
124-
```dart
125-
void main() {
126-
// Create a BitPattern.
127-
final $01V = BitPatternBuilder([
128-
BitPart.zero,
129-
BitPart.one,
130-
BitPart.v(1),
131-
]).build();
132-
133-
// Match it against bits.
134-
print($01V.matches('011'.bits)); // true
135-
136-
// Capture variables (if any), similar to a RegExp.
137-
print($01V.capture('011'.bits)); // [1]
138-
}
139-
```
140-
141118
## Compatibility
142119

143120
This package is intended to work identically and well in:

lib/src/int16.dart

+1
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ extension type const Int16._(int _) implements int {
356356
///
357357
/// [n] must be in the range of `0` to `width - 1`.
358358
@useResult
359+
// Intentional usage of positional boolean parameters.
359360
// ignore: avoid_positional_boolean_parameters
360361
Int16 setNthBit(int n, [bool value = true]) {
361362
RangeError.checkValidRange(0, n, width - 1, 'n');

lib/src/int32.dart

+1
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ extension type const Int32._(int _) implements int {
356356
///
357357
/// [n] must be in the range of `0` to `width - 1`.
358358
@useResult
359+
// Intentional usage of positional boolean parameters.
359360
// ignore: avoid_positional_boolean_parameters
360361
Int32 setNthBit(int n, [bool value = true]) {
361362
RangeError.checkValidRange(0, n, width - 1, 'n');

lib/src/int8.dart

+1
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ extension type const Int8._(int _) implements int {
354354
///
355355
/// [n] must be in the range of `0` to `width - 1`.
356356
@useResult
357+
// Intentional usage of positional boolean parameters.
357358
// ignore: avoid_positional_boolean_parameters
358359
Int8 setNthBit(int n, [bool value = true]) {
359360
RangeError.checkValidRange(0, n, width - 1, 'n');

lib/src/uint16.dart

+1
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ extension type const Uint16._(int _) implements int {
356356
///
357357
/// [n] must be in the range of `0` to `width - 1`.
358358
@useResult
359+
// Intentional usage of positional boolean parameters.
359360
// ignore: avoid_positional_boolean_parameters
360361
Uint16 setNthBit(int n, [bool value = true]) {
361362
RangeError.checkValidRange(0, n, width - 1, 'n');

lib/src/uint32.dart

+1
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ extension type const Uint32._(int _) implements int {
356356
///
357357
/// [n] must be in the range of `0` to `width - 1`.
358358
@useResult
359+
// Intentional usage of positional boolean parameters.
359360
// ignore: avoid_positional_boolean_parameters
360361
Uint32 setNthBit(int n, [bool value = true]) {
361362
RangeError.checkValidRange(0, n, width - 1, 'n');

lib/src/uint8.dart

+1
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ extension type const Uint8._(int _) implements int {
354354
///
355355
/// [n] must be in the range of `0` to `width - 1`.
356356
@useResult
357+
// Intentional usage of positional boolean parameters.
357358
// ignore: avoid_positional_boolean_parameters
358359
Uint8 setNthBit(int n, [bool value = true]) {
359360
RangeError.checkValidRange(0, n, width - 1, 'n');

pubspec.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
name: binary
44
description: Utilities for accessing binary data and bit manipulation in Dart and Flutter
5-
version: 4.0.0-alpha+7
5+
version: 4.0.0-beta
66

77
environment:
8-
# Required for https://github.com/dart-lang/sdk/issues/55135
9-
sdk: ^3.4.4
8+
sdk: ^3.5.0
109

1110
repository: https://github.com/matanlurey/binary.dart
1211

@@ -15,6 +14,6 @@ dependencies:
1514

1615
dev_dependencies:
1716
checks: ^0.3.0
18-
oath: ^0.2.0
17+
oath: ^0.2.1
1918
path: ^1.9.0
2019
test: ^1.25.8

tool/template

+1
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ extension type const {{NAME}}._(int _) implements int {
354354
///
355355
/// [n] must be in the range of `0` to `width - 1`.
356356
@useResult
357+
// Intentional usage of positional boolean parameters.
357358
// ignore: avoid_positional_boolean_parameters
358359
{{NAME}} setNthBit(int n, [bool value = true]) {
359360
RangeError.checkValidRange(0, n, width - 1, 'n');

0 commit comments

Comments
 (0)