LCOV - code coverage report
Current view: top level - lib/route/lib/route - r_fade.dart (source / functions) Coverage Total Hit
Test: lcov.info Lines: 100.0 % 7 7
Test Date: 2024-02-03 23:36:09 Functions: - 0 0

            Line data    Source code
       1              : import 'package:flutter/material.dart';
       2              : import 'package:nav/nav.dart';
       3              : import 'package:nav/route/custom_page_route_builder.dart';
       4              : 
       5              : class FadeRoute<T> extends CustomPageRouteBuilder<T> {
       6              :   final Widget widget;
       7              : 
       8            1 :   FadeRoute(this.widget, {int durationMs = Nav.defaultDurationMs})
       9            1 :       : super(
      10            1 :             pageBuilder: (BuildContext context, Animation<double> animation,
      11              :                 Animation<double> secondaryAnimation) {
      12              :               return widget;
      13              :             },
      14            1 :             transitionDuration: Duration(milliseconds: durationMs),
      15            1 :             transitionsBuilder: (BuildContext context,
      16              :                 Animation<double> animation,
      17              :                 Animation<double> secondaryAnimation,
      18              :                 Widget child) {
      19            1 :               return FadeTransition(
      20            2 :                 opacity: Tween<double>(begin: 0.0, end: 1.0).animate(animation),
      21              :                 child: child,
      22              :               );
      23              :             });
      24              : }
        

Generated by: LCOV version 2.0-1