mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
removed checkbox
This commit is contained in:
@ -56,24 +56,6 @@ class CustomExpansionTileState extends State<CustomExpansionTile> {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
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
|
// Expand/collapse icon, now wrapped in a GestureDetector for specific onTap
|
||||||
if (widget.children != null && widget.children!.isNotEmpty)
|
if (widget.children != null && widget.children!.isNotEmpty)
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
@ -84,7 +66,9 @@ class CustomExpansionTileState extends State<CustomExpansionTile> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Icon(
|
child: Icon(
|
||||||
_isExpanded ? Icons.keyboard_arrow_down : Icons.keyboard_arrow_right,
|
_isExpanded
|
||||||
|
? Icons.keyboard_arrow_down
|
||||||
|
: Icons.keyboard_arrow_right,
|
||||||
color: ColorsManager.lightGrayColor,
|
color: ColorsManager.lightGrayColor,
|
||||||
size: 16.0, // Adjusted size for better alignment
|
size: 16.0, // Adjusted size for better alignment
|
||||||
),
|
),
|
||||||
@ -101,8 +85,10 @@ class CustomExpansionTileState extends State<CustomExpansionTile> {
|
|||||||
_capitalizeFirstLetter(widget.title),
|
_capitalizeFirstLetter(widget.title),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: widget.isSelected
|
color: widget.isSelected
|
||||||
? ColorsManager.blackColor // Change color to black when selected
|
? ColorsManager
|
||||||
: ColorsManager.lightGrayColor, // Gray when not selected
|
.blackColor // Change color to black when selected
|
||||||
|
: ColorsManager
|
||||||
|
.lightGrayColor, // Gray when not selected
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -111,7 +97,9 @@ class CustomExpansionTileState extends State<CustomExpansionTile> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
// The expanded section (children) that shows when the tile is expanded
|
// 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(
|
||||||
padding: const EdgeInsets.only(left: 48.0), // Indented children
|
padding: const EdgeInsets.only(left: 48.0), // Indented children
|
||||||
child: Column(
|
child: Column(
|
||||||
|
Reference in New Issue
Block a user