Require Dart 3, update lints (dart-lang/timing#33)
diff --git a/pkgs/timing/.github/workflows/test-package.yml b/pkgs/timing/.github/workflows/test-package.yml
index f689ff5..752aef4 100644
--- a/pkgs/timing/.github/workflows/test-package.yml
+++ b/pkgs/timing/.github/workflows/test-package.yml
@@ -20,7 +20,7 @@
strategy:
fail-fast: false
matrix:
- sdk: [2.18.0, dev]
+ sdk: [3.0.0, dev]
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
@@ -44,7 +44,7 @@
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
- sdk: [2.18.0, dev]
+ sdk: [3.0.0, dev]
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
diff --git a/pkgs/timing/CHANGELOG.md b/pkgs/timing/CHANGELOG.md
index f7f3fbd..0c38a76 100644
--- a/pkgs/timing/CHANGELOG.md
+++ b/pkgs/timing/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.0.2-wip
+
+- Require Dart `3.0`.
+
## 1.0.1
- Require Dart `2.14`.
diff --git a/pkgs/timing/lib/src/timing.dart b/pkgs/timing/lib/src/timing.dart
index fae19bd..049ba81 100644
--- a/pkgs/timing/lib/src/timing.dart
+++ b/pkgs/timing/lib/src/timing.dart
@@ -317,7 +317,7 @@
return result
// Break possible sync processing of future completion, so slice
// trackers can be finished
- .whenComplete(() => Future.value())
+ .whenComplete(Future.value)
.whenComplete(() => _tracking = false) as T;
} else {
_tracking = false;
diff --git a/pkgs/timing/lib/timing.dart b/pkgs/timing/lib/timing.dart
index 0163e8d..5cb16d4 100644
--- a/pkgs/timing/lib/timing.dart
+++ b/pkgs/timing/lib/timing.dart
@@ -4,10 +4,10 @@
export 'src/timing.dart'
show
+ AsyncTimeTracker,
+ NoOpTimeTracker,
+ SimpleAsyncTimeTracker,
+ SyncTimeTracker,
TimeSlice,
TimeSliceGroup,
- TimeTracker,
- SyncTimeTracker,
- SimpleAsyncTimeTracker,
- AsyncTimeTracker,
- NoOpTimeTracker;
+ TimeTracker;
diff --git a/pkgs/timing/pubspec.yaml b/pkgs/timing/pubspec.yaml
index 323c28e..f81c2fc 100644
--- a/pkgs/timing/pubspec.yaml
+++ b/pkgs/timing/pubspec.yaml
@@ -1,18 +1,18 @@
name: timing
-version: 1.0.1
+version: 1.0.2-wip
description: >-
A simple package for tracking the performance of synchronous and asynchronous
actions.
repository: https://github.com/dart-lang/timing
environment:
- sdk: ">=2.14.0 <3.0.0"
+ sdk: ^3.0.0
dependencies:
json_annotation: ^4.3.0
dev_dependencies:
build_runner: ^2.0.0
- dart_flutter_team_lints: ^0.1.0
+ dart_flutter_team_lints: ^1.0.0
json_serializable: ^6.0.0
test: ^1.0.0