remove usage of Chain.track
diff --git a/lib/src/util.dart b/lib/src/util.dart
index 62dbf47..287ac9b 100644
--- a/lib/src/util.dart
+++ b/lib/src/util.dart
@@ -4,13 +4,6 @@
library shelf_static.util;
-import 'dart:async';
-
-import 'package:stack_trace/stack_trace.dart';
-
-/// Like [Future.sync], but wraps the Future in [Chain.track] as well.
-Future syncFuture(callback()) => Chain.track(new Future.sync(callback));
-
DateTime toSecondResolution(DateTime dt) {
if (dt.millisecond == 0) return dt;
return dt.subtract(new Duration(milliseconds: dt.millisecond));
diff --git a/pubspec.yaml b/pubspec.yaml
index f910271..23cd9cd 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -4,7 +4,7 @@
description: Static file server support for Shelf
homepage: https://github.com/kevmoo/shelf_static.dart
environment:
- sdk: '>=1.0.0 <2.0.0'
+ sdk: '>=1.7.0 <2.0.0'
dependencies:
http_parser: '>=0.0.2+2 <0.1.0'
mime: '>=0.9.0 <0.10.0'
diff --git a/test/sample_test.dart b/test/sample_test.dart
index 0f26a5a..dea72f3 100644
--- a/test/sample_test.dart
+++ b/test/sample_test.dart
@@ -8,7 +8,6 @@
import 'package:shelf/shelf.dart';
import 'package:shelf_static/shelf_static.dart';
-import 'package:shelf_static/src/util.dart';
import 'test_util.dart';
@@ -79,7 +78,7 @@
Future<Response> _request(Request request) {
var handler = createStaticHandler(_samplePath);
- return syncFuture(() => handler(request));
+ return new Future.sync(() => handler(request));
}
String get _samplePath {
diff --git a/test/test_util.dart b/test/test_util.dart
index 3e17d87..8bf66fc 100644
--- a/test/test_util.dart
+++ b/test/test_util.dart
@@ -17,7 +17,7 @@
Future<Response> makeRequest(Handler handler, String path,
{String scriptName, Map<String, String> headers}) {
var rootedHandler = _rootHandler(scriptName, handler);
- return syncFuture(() => rootedHandler(_fromPath(path, headers)));
+ return new Future.sync(() => rootedHandler(_fromPath(path, headers)));
}
Request _fromPath(String path, Map<String, String> headers) =>