From 845b50319b81449dd7c82786ac5ce5980e491fab Mon Sep 17 00:00:00 2001 From: behnam-deriv <133759298+behnam-deriv@users.noreply.github.com> Date: Fri, 19 Jun 2026 16:38:46 +0800 Subject: [PATCH] Revert "fix: marker series issue rebuild (#476)" This reverts commit 98ea7b6ae90f884f88ddafc28fc5248193bbe696. --- lib/src/deriv_chart/chart/main_chart.dart | 30 +++++++++-------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/lib/src/deriv_chart/chart/main_chart.dart b/lib/src/deriv_chart/chart/main_chart.dart index e729aef57..54c050867 100644 --- a/lib/src/deriv_chart/chart/main_chart.dart +++ b/lib/src/deriv_chart/chart/main_chart.dart @@ -399,11 +399,6 @@ class _ChartImplementationState extends BasicChartState { @override Widget build(BuildContext context) => LayoutBuilder( - // Force remount when markerSeries changes. - // LayoutBuilder only re-invokes its builder on constraint changes; - // without a key that tracks markerSeries identity, the old - // MarkerArea subtree persists after trade-type switches. - key: ObjectKey(widget.markerSeries), builder: (BuildContext context, BoxConstraints constraints) { final XAxisModel xAxis = context.watch(); @@ -584,20 +579,17 @@ class _ChartImplementationState extends BasicChartState { ), ); - Widget _buildMarkerArea() => KeyedSubtree( - key: ObjectKey(widget.markerSeries), - child: MultipleAnimatedBuilder( - animations: [ - currentTickAnimation, - topBoundQuoteAnimationController, - bottomBoundQuoteAnimationController - ], - builder: (BuildContext context, _) => MarkerArea( - markerSeries: widget.markerSeries!, - quoteToCanvasY: chartQuoteToCanvasY, - animationInfo: AnimationInfo( - currentTickPercent: currentTickAnimation.value, - ), + Widget _buildMarkerArea() => MultipleAnimatedBuilder( + animations: [ + currentTickAnimation, + topBoundQuoteAnimationController, + bottomBoundQuoteAnimationController + ], + builder: (BuildContext context, _) => MarkerArea( + markerSeries: widget.markerSeries!, + quoteToCanvasY: chartQuoteToCanvasY, + animationInfo: AnimationInfo( + currentTickPercent: currentTickAnimation.value, ), ), );