3.0.1
This commit is contained in:
parent
4437b21157
commit
8ae686877b
3 changed files with 7 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -35,8 +35,8 @@ class Router<T> {
|
|||
|
||||
List<T> get middleware => new List<T>.unmodifiable(_middleware);
|
||||
|
||||
Map<Pattern, Router> get mounted =>
|
||||
new Map<Pattern, Router>.unmodifiable(_mounted);
|
||||
Map<Pattern, Router<T>> get mounted =>
|
||||
new Map<Pattern, Router<T>>.unmodifiable(_mounted);
|
||||
|
||||
List<Route<T>> get routes {
|
||||
return _routes.fold<List<Route<T>>>([], (out, route) {
|
||||
|
@ -163,7 +163,7 @@ class Router<T> {
|
|||
///
|
||||
/// Returns the created route.
|
||||
/// You can also register middleware within the router.
|
||||
SymlinkRoute<T> group(String path, void callback(Router router),
|
||||
SymlinkRoute<T> group(String path, void callback(Router<T> router),
|
||||
{Iterable<T> middleware: const [], String name: null}) {
|
||||
final router = new Router<T>().._middleware.addAll(middleware);
|
||||
callback(router);
|
||||
|
|
|
@ -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 <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/angel_route
|
||||
environment:
|
||||
|
|
Loading…
Reference in a new issue