From f709b92e1266901aa521bd83763d7576a5981cb6 Mon Sep 17 00:00:00 2001 From: Faris Armoush Date: Wed, 16 Apr 2025 14:44:31 +0300 Subject: [PATCH] Refactor constructor formatting and improve readability in CustomExpansionTileSpaceTree. --- .../space_tree/view/custom_expansion.dart | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/pages/space_tree/view/custom_expansion.dart b/lib/pages/space_tree/view/custom_expansion.dart index c06816b4..c9755180 100644 --- a/lib/pages/space_tree/view/custom_expansion.dart +++ b/lib/pages/space_tree/view/custom_expansion.dart @@ -11,16 +11,17 @@ class CustomExpansionTileSpaceTree extends StatelessWidget { final void Function()? onExpansionChanged; final void Function()? onItemSelected; - const CustomExpansionTileSpaceTree( - {super.key, - this.spaceId, - required this.title, - this.children, - this.isExpanded = false, - this.onExpansionChanged, - this.onItemSelected, - required this.isSelected, - this.isSoldCheck = false}); + const CustomExpansionTileSpaceTree({ + required this.isSelected, + required this.title, + this.spaceId, + this.children, + this.onExpansionChanged, + this.onItemSelected, + this.isExpanded = false, + this.isSoldCheck = false, + super.key, + }); @override Widget build(BuildContext context) { @@ -56,7 +57,9 @@ class CustomExpansionTileSpaceTree extends StatelessWidget { } }, 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, ), @@ -72,7 +75,8 @@ class CustomExpansionTileSpaceTree extends StatelessWidget { _capitalizeFirstLetter(title), style: Theme.of(context).textTheme.bodySmall!.copyWith( color: isSelected - ? ColorsManager.blackColor // Change color to black when selected + ? ColorsManager + .blackColor // Change color to black when selected : ColorsManager.lightGrayColor, // Gray when not selected fontWeight: FontWeight.w400, ),