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

            Line data    Source code
       1              : import 'package:amadeus_proto/widget/padded_card.dart';
       2              : import 'package:flutter/material.dart';
       3              : import 'package:flutter_svg/svg.dart';
       4              : 
       5              : class MenuButton extends StatelessWidget {
       6            0 :   const MenuButton({
       7              :     super.key,
       8              :     required this.icon,
       9              :     required this.text,
      10              :     this.onTap,
      11              :     this.isDisabled = false,
      12              :   });
      13              : 
      14              :   final Widget icon;
      15              :   final String text;
      16              :   final void Function()? onTap;
      17              :   final bool isDisabled;
      18              : 
      19            0 :   @override
      20              :   Widget build(BuildContext context) {
      21            0 :     return InkWell(
      22            0 :       onTap: isDisabled ? null : onTap,
      23            0 :       child: PaddedCard(
      24              :         padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 15),
      25            0 :         color: isDisabled ? Colors.grey.shade200 : null,
      26            0 :         borderColor: isDisabled ? Colors.grey.shade300 : null,
      27            0 :         child: Row(
      28            0 :           children: [
      29            0 :             if (isDisabled)
      30            0 :               ShaderMask(
      31            0 :                 shaderCallback: (rect) => LinearGradient(
      32            0 :                   colors: [Colors.grey.shade500, Colors.grey.shade500], // Single color
      33            0 :                 ).createShader(rect),
      34              :                 blendMode: BlendMode.srcIn,
      35            0 :                 child: icon,
      36              :               )
      37              :             else
      38            0 :               icon,
      39            0 :             const SizedBox(
      40              :               width: 8,
      41              :             ),
      42            0 :             Text(
      43            0 :               text,
      44            0 :               style: TextStyle(
      45              :                 fontWeight: FontWeight.bold,
      46              :                 fontSize: 17,
      47            0 :                 color: isDisabled ? Colors.grey.shade500 : null,
      48              :               ),
      49              :             ),
      50            0 :             const Spacer(),
      51            0 :             SvgPicture.asset(
      52              :               "assets/FigmaDesign/Asset/SVG/CaretRight.svg",
      53              :               height: 30,
      54            0 :               color: isDisabled ? Colors.grey.shade500 : null,
      55              :             ),
      56              :           ],
      57              :         ),
      58              :       ),
      59              :     );
      60              :   }
      61              : }
        

Generated by: LCOV version 2.3-1