LCOV - code coverage report
Current view: top level - lib/route/lib/route - clipper_circle.dart (source / functions) Coverage Total Hit
Test: lcov.info Lines: 100.0 % 10 10
Test Date: 2024-02-04 17:27:12 Functions: - 0 0

            Line data    Source code
       1              : import 'dart:ui';
       2              : 
       3              : import 'package:flutter/material.dart';
       4              : 
       5              : @immutable
       6              : class CircularRevealClipper extends CustomClipper<Path> {
       7              :   final double fraction;
       8              :   final Alignment? centerAlignment;
       9              :   final Offset centerOffset;
      10              :   final double? minRadius;
      11              :   final double maxRadius;
      12              : 
      13            2 :   const CircularRevealClipper({
      14              :     required this.fraction,
      15              :     required this.centerOffset,
      16              :     this.centerAlignment,
      17              :     this.minRadius,
      18              :     required this.maxRadius,
      19              :   });
      20              : 
      21            2 :   @override
      22              :   Path getClip(Size size) {
      23              :     final Offset center =
      24            4 :         centerAlignment?.alongSize(size) ?? centerOffset;
      25            2 :     final minRadius = this.minRadius ?? 0;
      26            2 :     final maxRadius = this.maxRadius;
      27              : 
      28            2 :     return Path()
      29            2 :       ..addOval(
      30            2 :         Rect.fromCircle(
      31              :           center: center,
      32            4 :           radius: lerpDouble(minRadius, maxRadius, fraction)!,
      33              :         ),
      34              :       );
      35              :   }
      36              : 
      37            2 :   @override
      38              :   bool shouldReclip(CustomClipper<Path> oldClipper) => true;
      39              : }
        

Generated by: LCOV version 2.0-1