diff --git a/lib/pages/spaces_management/widgets/community_structure_widget.dart b/lib/pages/spaces_management/widgets/community_structure_widget.dart index 4f609827..51b4a403 100644 --- a/lib/pages/spaces_management/widgets/community_structure_widget.dart +++ b/lib/pages/spaces_management/widgets/community_structure_widget.dart @@ -127,7 +127,12 @@ class _CommunityStructureAreaState extends State { child: Stack( children: [ for (var connection in connections) - CustomPaint(painter: CurvedLinePainter([connection])), + Opacity( + opacity: _isHighlightedConnection(connection) + ? 1.0 + : 0.3, // Adjust opacity + child: CustomPaint(painter: CurvedLinePainter([connection])), + ), for (var entry in visibleSpaces.asMap().entries) Positioned( left: entry.value.position.dx, @@ -601,4 +606,11 @@ class _CommunityStructureAreaState extends State { } } } + + bool _isHighlightedConnection(Connection connection) { + if (widget.selectedSpace == null) return true; + + return connection.startSpace == widget.selectedSpace || + connection.endSpace == widget.selectedSpace; + } }