LCOV - code coverage report
Current view: top level - lib/test/lib/test - nav_app_for_testing.dart (source / functions) Coverage Total Hit
Test: lcov.info Lines: 100.0 % 10 10
Test Date: 2024-02-05 08:51:01 Functions: - 0 0

            Line data    Source code
       1              : import 'package:flutter/material.dart';
       2              : import 'package:nav/nav.dart';
       3              : 
       4              : class NavAppForTesting extends StatefulWidget {
       5              :   final Widget child;
       6            9 :   static final globalNavigatorKey = GlobalKey<NavigatorState>();
       7              : 
       8            3 :   const NavAppForTesting({super.key, required this.child});
       9              : 
      10            3 :   @override
      11            3 :   State<NavAppForTesting> createState() => _NavAppForTestingState();
      12              : }
      13              : 
      14              : class _NavAppForTestingState extends State<NavAppForTesting> with Nav {
      15            3 :   @override
      16              :   Widget build(BuildContext context) {
      17            3 :     return MaterialApp(
      18            6 :       home: widget.child,
      19            3 :       navigatorKey: navigatorKey,
      20              :     );
      21              :   }
      22              : 
      23            3 :   @override
      24              :   GlobalKey<NavigatorState> get navigatorKey =>
      25            3 :       NavAppForTesting.globalNavigatorKey;
      26              : }
        

Generated by: LCOV version 2.0-1