LCOV - code coverage report
Current view: top level - src - beamer_parser.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 5 5 100.0 %
Date: 2021-12-03 10:03:44 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:flutter/foundation.dart';
       2             : import 'package:flutter/widgets.dart';
       3             : 
       4             : /// Parses [RouteInformation] into a type that [BeamerDelegate] will understand,
       5             : /// which is again [RouteInformation].
       6             : class BeamerParser extends RouteInformationParser<RouteInformation> {
       7             :   /// Creates a [BeamerParser] with specified properties.
       8           8 :   BeamerParser({this.onParse});
       9             : 
      10             :   /// Used to inspect and/or modify the parsed [RouteInformation]
      11             :   /// before returning it for [BeamerDelegate] to use.
      12             :   final RouteInformation Function(RouteInformation)? onParse;
      13             : 
      14           7 :   @override
      15             :   SynchronousFuture<RouteInformation> parseRouteInformation(
      16             :           RouteInformation routeInformation) =>
      17           7 :       SynchronousFuture(
      18           7 :         onParse?.call(routeInformation) ?? routeInformation,
      19             :       );
      20             : 
      21           7 :   @override
      22             :   RouteInformation restoreRouteInformation(RouteInformation configuration) =>
      23             :       configuration;
      24             : }

Generated by: LCOV version 1.14