Skip to content

Commit 9510ba1

Browse files
authored
Fixed warnings and hints before publishing (#141)
1 parent 8ff1ea6 commit 9510ba1

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

rollbar_common/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- Updated http library to '>=0.13.0 <2.0.0'
66
- Updated uuid library to '^4.1.0'
7+
- Updated sdk constraint to '>=2.17.0 <4.0.0'
8+
- Fixed warnings about the value of 'identity' not being used.
79

810
## 1.1.0
911

rollbar_common/lib/src/extension/function.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ bool isNotNull<T>(T? x) => x != null;
5555
/// ```
5656
/// id := λx.x where x: bool ≡ bool isTrue(bool x) => x;
5757
/// ```
58-
const isTrue = identity<bool>;
58+
bool isTrue(bool x) => x;
5959

6060
/// Tests whether the given boolean argument [x] is false.
6161
///

rollbar_common/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ documentation: https://docs.rollbar.com/docs/flutter#dart
66
repository: https://github.com/rollbar/rollbar-flutter
77

88
environment:
9-
sdk: '>=2.17.0 <3.0.0'
9+
sdk: '>=2.17.0 <4.0.0'
1010

1111
dependencies:
1212
http: '>=0.13.0 <2.0.0'

rollbar_common/test/table_set_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void main() {
5858
expect(payloadRecords.length, ++recordsCount);
5959
}
6060

61-
for (final record in payloadRecords.map(identity)) {
61+
for (final record in payloadRecords.map((x) => x)) {
6262
expect(payloadRecords.remove(record), isTrue);
6363
expect(payloadRecords.record(id: record.id), isNull);
6464
expect(payloadRecords.length, --recordsCount);
@@ -152,7 +152,7 @@ void main() {
152152
expect(payloadRecords.length, 16);
153153

154154
final transformResult = payloadRecords.map(records.contains);
155-
expect(transformResult.all(identity), isTrue);
155+
expect(transformResult.all((x) => x), isTrue);
156156

157157
for (final record in payloadRecords) {
158158
expect(records.contains(record), isTrue);

rollbar_dart/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 1.3.2
44

55
- Updated http library to '>=0.13.0 <2.0.0'
6+
- Updated sdk constraint to '>=2.17.0 <4.0.0'
67
- Fixed usage of unsafe_html which was removed in Dart 3.7.0.
78

89
## 1.3.1

rollbar_dart/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ documentation: https://docs.rollbar.com/docs/flutter#dart
66
repository: https://github.com/rollbar/rollbar-flutter
77

88
environment:
9-
sdk: '>=2.17.0 <3.0.0'
9+
sdk: '>=2.17.0 <4.0.0'
1010

1111
dependencies:
1212
http: '>=0.13.0 <2.0.0'

0 commit comments

Comments
 (0)