LCOV - code coverage report
Current view: top level - lib/src/trie_router/src - router_result.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 7 7 100.0 %
Date: 2021-04-04 17:06:32 Functions: 0 0 -

          Line data    Source code
       1             : import '../../../routemaster.dart';
       2             : 
       3             : class RouterResult {
       4             :   /// The builder matching the path
       5             :   final PageBuilder builder;
       6             : 
       7             :   /// Path parameters matched in this path section
       8             :   /// e.g. '/blah/:id' becomes `pathParameters['id']`
       9             :   final Map<String, String> pathParameters;
      10             : 
      11             :   /// The path for this path segment. This isn't the complete path requested.
      12             :   /// e.g. a look up for '/blah/test' will return 3 RouterResults with paths:
      13             :   ///         1. /
      14             :   ///         2. /blah
      15             :   ///         3. /blah/test
      16             :   final String pathSegment;
      17             : 
      18          11 :   const RouterResult(this.builder, this.pathParameters, this.pathSegment);
      19             : 
      20           1 :   @override
      21           2 :   int get hashCode => pathSegment.hashCode;
      22             : 
      23           1 :   @override
      24             :   bool operator ==(Object other) {
      25           4 :     return other is RouterResult && pathSegment == other.pathSegment;
      26             :   }
      27             : 
      28           1 :   @override
      29             :   String toString() {
      30           3 :     return "RouterData - path: '$pathSegment',  params: '$pathParameters'";
      31             :   }
      32             : }

Generated by: LCOV version 1.15