Permalink
Browse files

bug: In Dart 2.x List converts to JSArray, changed List to generic Li…

…st<String>
  • Loading branch information...
MikeMitterer committed Jun 27, 2018
1 parent 73336e4 commit aaca0d78ec7aa35f39c2453a13b9753dacd14748
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/browser.dart
  2. +1 −1 pubspec.yaml
@@ -37,7 +37,7 @@ void _defaultEnterCallback(final RouteEnterEvent event) {
class Router {
final _logger = new Logger('m4d_router.browser.router');

final LinkedHashMap<UrlPattern, Route> _handlers;
final HashMap<UrlPattern, Route> _handlers;
final bool useFragment;

bool _listen = false;
@@ -56,7 +56,7 @@ class Router {
/// value is null which then determines the behavior based on
/// [History.supportsState].
Router({final bool useFragment: true})
: _handlers = new LinkedHashMap<UrlPattern, Route>(),
: _handlers = new HashMap<UrlPattern, Route>(),
useFragment = (useFragment == null) ? !History.supportsState : useFragment;

/// Registers a function that will be invoked when the router handles a URL
@@ -149,7 +149,7 @@ class Router {
///
/// On older browsers [Location.assign] is used instead with the fragment
/// version of the UrlPattern.
void gotoUrl(final UrlPattern urlPattern, final List params) {
void gotoUrl(final UrlPattern urlPattern, final List<String> params) {
final route = _handlers.containsKey(urlPattern) ? _handlers[urlPattern]
: throw new ArgumentError('Unknown URL pattern: $urlPattern');

@@ -14,7 +14,7 @@ dependencies:
validate: ^1.0.0

dev_dependencies:
test: any
test: ^1.0.0
mockito: any
console_log_handler: ^1.0.0

0 comments on commit aaca0d7

Please sign in to comment.