diff --git a/lib/src/route_data.dart b/lib/src/route_data.dart index 5b46dde..d640c0f 100644 --- a/lib/src/route_data.dart +++ b/lib/src/route_data.dart @@ -163,7 +163,7 @@ class RouteData { requestSource: RequestSource.values.firstWhere( (source) => source.toString() == requestSource, ), - pathTemplate: state['pathTemplate'] as String, + pathTemplate: state['pathTemplate'] as String?, pathParameters: (state['pathParameters'] as Map) .cast(), historyIndex: state['historyIndex'] as int?,