Fixed type error

This commit is contained in:
thomashii 2021-03-21 08:19:16 +08:00
parent 1ccc78e3a2
commit 3dadedaf20
2 changed files with 2 additions and 2 deletions

View file

@ -193,7 +193,7 @@ abstract class Parser<T> {
var preceding =
r.value!.isEmpty ? [] : (r.value![0] == null ? [] : [r.value![0]]);
var out = List<T>.from(preceding);
if (r.value![1] != null) out.addAll(r.value![1] as Iterable<T>);
if (r.value![1] != null) out.addAll(r.value![1] as List<T>);
return out;
});
}

View file

@ -14,7 +14,7 @@ class Route<T> {
: _routeDefinition = RouteGrammar.routeDefinition
.parse(SpanScanner(path.replaceAll(_straySlashes, '')))!
.value {
if (_routeDefinition?.segments?.isNotEmpty != true) {
if (_routeDefinition?.segments.isNotEmpty != true) {
_parser = match('').map((r) => RouteResult({}));
}
}