Skip to content

Commit b538295

Browse files
authored
Fix deprecated zone API usage (flutter#95)
1 parent 94356f0 commit b538295

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: dart
22

33
dart:
44
- dev
5-
- 2.2.0
5+
- 2.8.4
66

77
os:
88
- linux
@@ -16,7 +16,7 @@ matrix:
1616
include:
1717
- dart: dev
1818
dart_task: dartfmt
19-
- dart: 2.2.0
19+
- dart: 2.8.4
2020
dart_task:
2121
dartanalyzer: --fatal-warnings .
2222
- dart: dev

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# 0.9.8
1+
# 0.9.8-dev
22

33
* Add the ability to create custom Watcher types for specific file paths.
4+
* Require at least Dart 2.8.4.
45

56
# 0.9.7+15
67

lib/src/directory_watcher/windows.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,11 @@ class _WindowsDirectoryWatcher
379379
void _startWatch() {
380380
// Note: "watcher closed" exceptions do not get sent over the stream
381381
// returned by watch, and must be caught via a zone handler.
382-
runZoned(() {
382+
runZonedGuarded(() {
383383
var innerStream = Directory(path).watch(recursive: true);
384384
_watchSubscription = innerStream.listen(_onEvent,
385385
onError: _eventsController.addError, onDone: _onDone);
386-
}, onError: (error, StackTrace stackTrace) {
386+
}, (error, StackTrace stackTrace) {
387387
if (error is FileSystemException &&
388388
error.message.startsWith('Directory watcher closed unexpectedly')) {
389389
_watchSubscription.cancel();

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: watcher
2-
version: 0.9.7+15
2+
version: 0.9.8-dev
33

44
description: >-
55
A file system watcher. It monitors changes to contents of directories and
66
sends notifications when files have been added, removed, or modified.
7-
homepage: https://github.com/dart-lang/watcher
7+
repository: https://github.com/dart-lang/watcher
88

99
environment:
10-
sdk: '>=2.2.0 <3.0.0'
10+
sdk: '>=2.8.4 <3.0.0'
1111

1212
dependencies:
1313
async: ^2.0.0

0 commit comments

Comments
 (0)