LCOV - code coverage report
Current view: top level - lib\src\matcher.dart - matcher.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 6 6 100.0 %
Date: Sun Jul 10 19:19:48 2022 Functions: 0 0 -

          Line data    Source code
       1             : import 'route_info.dart';
       2             : 
       3             : class Matcher {
       4             :   final String path;
       5             :   final RegExp matcher;
       6             : 
       7           1 :   const Matcher(this.path, this.matcher);
       8             : 
       9           1 :   RouteInfo? matchWith(expPath) {
      10           2 :     final match = matcher.firstMatch(expPath);
      11             : 
      12             :     if (match == null) {
      13             :       return null;
      14             :     }
      15             : 
      16             :     final values =
      17           5 :         List.generate(match.groupCount, (index) => match.group(index + 1));
      18           2 :     final data = Map.fromIterables(match.groupNames, values);
      19             : 
      20           2 :     return RouteInfo(path: path, data: data);
      21             :   }
      22             : }

Generated by: LCOV version 1.15.alpha0w