From 8ae686877b69f8c8030ac69ca99ebf062b4ccf15 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sat, 8 Dec 2018 21:32:55 -0500 Subject: [PATCH] 3.0.1 --- CHANGELOG.md | 3 +++ lib/src/router.dart | 6 +++--- pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5ce0ed4..a5f08002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 3.0.1 +* Make the callback in `Router.group` generically-typed. + # 3.0.0 * Make `Router` and `Route` single-parameter generic. * Remove `package:browser` dependency. diff --git a/lib/src/router.dart b/lib/src/router.dart index 6e9d91ac..d24c97fe 100644 --- a/lib/src/router.dart +++ b/lib/src/router.dart @@ -35,8 +35,8 @@ class Router { List get middleware => new List.unmodifiable(_middleware); - Map get mounted => - new Map.unmodifiable(_mounted); + Map> get mounted => + new Map>.unmodifiable(_mounted); List> get routes { return _routes.fold>>([], (out, route) { @@ -163,7 +163,7 @@ class Router { /// /// Returns the created route. /// You can also register middleware within the router. - SymlinkRoute group(String path, void callback(Router router), + SymlinkRoute group(String path, void callback(Router router), {Iterable middleware: const [], String name: null}) { final router = new Router().._middleware.addAll(middleware); callback(router); diff --git a/pubspec.yaml b/pubspec.yaml index 34ce7553..1be494f0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: angel_route description: A powerful, isomorphic routing library for Dart. It is mainly used in the Angel framework, but can be used in Flutter and on the Web. -version: 3.0.0 +version: 3.0.1 author: Tobe O homepage: https://github.com/angel-dart/angel_route environment: