LCOV - code coverage report
Current view: | top level - src/routing - route_information_parser.dart (source / functions) |  |  | Hit | Total | Coverage
Test: | lcov.info |  | Lines: | 0 | 7 | 0.0 %
Date: | 2021-10-11 06:57:03 |  | Functions: | 0 | 0 | -

              Line data    Source code
           1             : import 'package:flutter/widgets.dart';
           2             : import 'package:widgetbook/src/routing/story_route_path.dart';
           3             :
           4             : class StoryRouteInformationParser
           5             :     extends RouteInformationParser<StoryRoutePath> {
           6           0 :   StoryRouteInformationParser({
           7             :     required this.onRoute,
           8             :   });
           9             :
          10             :   final Function(String path) onRoute;
          11             :
          12             :   @override
          13           0 :   Future<StoryRoutePath> parseRouteInformation(
          14             :     RouteInformation routeInformation,
          15             :   ) async {
          16           0 :     final uri = Uri.parse(routeInformation.location ?? '');
          17           0 :     onRoute(uri.path);
          18           0 :     return StoryRoutePath(path: uri.path);
          19             :   }
          20             :
          21           0 :   @override
          22             :   RouteInformation restoreRouteInformation(StoryRoutePath configuration) {
          23           0 :     return RouteInformation(location: configuration.path);
          24             :   }
          25             : }

Generated by: LCOV version 1.15