From b84513c09dc79624f70b3c04e761adeac4bcca46 Mon Sep 17 00:00:00 2001 From: hannathkadher Date: Fri, 28 Feb 2025 11:51:48 +0400 Subject: [PATCH] removed checkbox --- lib/common/widgets/custom_expansion_tile.dart | 32 ++++++------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/lib/common/widgets/custom_expansion_tile.dart b/lib/common/widgets/custom_expansion_tile.dart index 8df9b663..3823b18f 100644 --- a/lib/common/widgets/custom_expansion_tile.dart +++ b/lib/common/widgets/custom_expansion_tile.dart @@ -56,24 +56,6 @@ class CustomExpansionTileState extends State { children: [ Row( children: [ - // Checkbox with independent state management - Checkbox( - value: false, - onChanged: (bool? value) { - setState(() {}); - }, - side: WidgetStateBorderSide.resolveWith((states) { - return const BorderSide(color: ColorsManager.grayBorder); - }), - fillColor: WidgetStateProperty.resolveWith((states) { - if (states.contains(WidgetState.selected)) { - return ColorsManager.grayBorder; - } else { - return ColorsManager.checkBoxFillColor; - } - }), - checkColor: ColorsManager.whiteColors, - ), // Expand/collapse icon, now wrapped in a GestureDetector for specific onTap if (widget.children != null && widget.children!.isNotEmpty) GestureDetector( @@ -84,7 +66,9 @@ class CustomExpansionTileState extends State { }); }, child: Icon( - _isExpanded ? Icons.keyboard_arrow_down : Icons.keyboard_arrow_right, + _isExpanded + ? Icons.keyboard_arrow_down + : Icons.keyboard_arrow_right, color: ColorsManager.lightGrayColor, size: 16.0, // Adjusted size for better alignment ), @@ -101,8 +85,10 @@ class CustomExpansionTileState extends State { _capitalizeFirstLetter(widget.title), style: TextStyle( color: widget.isSelected - ? ColorsManager.blackColor // Change color to black when selected - : ColorsManager.lightGrayColor, // Gray when not selected + ? ColorsManager + .blackColor // Change color to black when selected + : ColorsManager + .lightGrayColor, // Gray when not selected fontWeight: FontWeight.w400, ), ), @@ -111,7 +97,9 @@ class CustomExpansionTileState extends State { ], ), // The expanded section (children) that shows when the tile is expanded - if (_isExpanded && widget.children != null && widget.children!.isNotEmpty) + if (_isExpanded && + widget.children != null && + widget.children!.isNotEmpty) Padding( padding: const EdgeInsets.only(left: 48.0), // Indented children child: Column(