Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions lib/src/deriv_chart/chart/main_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,6 @@ class _ChartImplementationState extends BasicChartState<MainChart> {

@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<XAxisModel>();

Expand Down Expand Up @@ -584,20 +579,17 @@ class _ChartImplementationState extends BasicChartState<MainChart> {
),
);

Widget _buildMarkerArea() => KeyedSubtree(
key: ObjectKey(widget.markerSeries),
child: MultipleAnimatedBuilder(
animations: <Listenable>[
currentTickAnimation,
topBoundQuoteAnimationController,
bottomBoundQuoteAnimationController
],
builder: (BuildContext context, _) => MarkerArea(
markerSeries: widget.markerSeries!,
quoteToCanvasY: chartQuoteToCanvasY,
animationInfo: AnimationInfo(
currentTickPercent: currentTickAnimation.value,
),
Widget _buildMarkerArea() => MultipleAnimatedBuilder(
animations: <Listenable>[
currentTickAnimation,
topBoundQuoteAnimationController,
bottomBoundQuoteAnimationController
],
builder: (BuildContext context, _) => MarkerArea(
markerSeries: widget.markerSeries!,
quoteToCanvasY: chartQuoteToCanvasY,
animationInfo: AnimationInfo(
currentTickPercent: currentTickAnimation.value,
),
),
);
Expand Down
Loading