LCOV - code coverage report
Current view: top level - lib/exercises/widget - animation_dialog_wrapper.dart Coverage Total Hit
Test: lcov.info Lines: 0.0 % 13 0
Test Date: 2025-05-10 20:26:13 Functions: - 0 0

            Line data    Source code
       1              : import 'package:flutter/material.dart';
       2              : 
       3              : class AnimatedDialogWrapper extends StatefulWidget {
       4              :   final Widget child;
       5              :   final Animation<double> animation;
       6              : 
       7            0 :   const AnimatedDialogWrapper({
       8              :     super.key,
       9              :     required this.child,
      10              :     required this.animation,
      11              :   });
      12              : 
      13            0 :   @override
      14            0 :   State<AnimatedDialogWrapper> createState() => AnimatedDialogWrapperState();
      15              : }
      16              : 
      17              : class AnimatedDialogWrapperState extends State<AnimatedDialogWrapper> {
      18              :   bool _isAnimationCompleted = false;
      19              : 
      20            0 :   @override
      21              :   void initState() {
      22            0 :     super.initState();
      23            0 :     widget.animation.addStatusListener((status) {
      24            0 :       if (status == AnimationStatus.completed) {
      25            0 :         setState(() {
      26            0 :           _isAnimationCompleted = true;
      27              :         });
      28              :       }
      29              :     });
      30              :   }
      31              : 
      32            0 :   @override
      33              :   Widget build(BuildContext context) {
      34            0 :     return AbsorbPointer(
      35            0 :       absorbing: !_isAnimationCompleted,
      36            0 :       child: widget.child,
      37              :     );
      38              :   }
      39              : }
        

Generated by: LCOV version 2.3-1