@@ -251,11 +251,17 @@ class DerivChartWrapperState extends State<DerivChartWrapper> {
251251
252252 final bool isTickGranularity = granularity < 60000 ;
253253
254+ final bool isLightMode =
255+ configModel.theme is ChartDefaultLightTheme ;
256+
254257 final DataSeries <Tick > mainSeries =
255258 getDataSeries (feedModel, configModel, granularity);
256259
257- final Color latestTickColor = Color .fromRGBO (
258- 255 , 68 , 81 , configModel.isSymbolClosed ? 0.32 : 1 );
260+ final Color latestTickColor = isLightMode
261+ ? Color .fromRGBO (
262+ 0 , 0 , 0 , configModel.isSymbolClosed ? 0.32 : 1 )
263+ : Color .fromRGBO (255 , 255 , 255 ,
264+ configModel.isSymbolClosed ? 0.32 : 1 );
259265
260266 final Duration animationDuration = _getAnimationDuration (
261267 isTickGranularity: isTickGranularity);
@@ -273,46 +279,49 @@ class DerivChartWrapperState extends State<DerivChartWrapper> {
273279 feedModel.ticks.last,
274280 id: 'last_tick_indicator' ,
275281 style: HorizontalBarrierStyle (
282+ labelPadding: 8 ,
276283 color: latestTickColor,
277- labelShape: LabelShape .pentagon,
278284 hasArrow: false ,
279- textStyle: const TextStyle (
285+ textStyle: TextStyle (
280286 fontSize: 12 ,
281287 height: 1.3 ,
282288 fontWeight: FontWeight .w600,
283- color: Colors .white,
284- fontFeatures: < FontFeature > [
289+ color: isLightMode
290+ ? Colors .white
291+ : Colors .black,
292+ fontFeatures: const < FontFeature > [
285293 FontFeature .tabularFigures ()
286294 ],
287295 )),
288296 visibility: HorizontalBarrierVisibility
289297 .keepBarrierLabelVisible,
290298 ),
291299 if (configModel.isLive)
292- BlinkingTickIndicator (
293- feedModel.ticks.last,
294- id: 'blink_tick_indicator' ,
295- visibility: HorizontalBarrierVisibility
296- .keepBarrierLabelVisible,
297- ),
300+ BlinkingTickIndicator (feedModel.ticks.last,
301+ id: 'blink_tick_indicator' ,
302+ visibility: HorizontalBarrierVisibility
303+ .keepBarrierLabelVisible,
304+ style: HorizontalBarrierStyle (
305+ color: isLightMode
306+ ? Colors .black
307+ : Colors .white,
308+ )),
298309 if (app.configModel.showTimeInterval &&
299310 ! isTickGranularity)
300311 TimeIntervalIndicator (
301312 app.configModel.remainingTime,
302313 feedModel.ticks.last.close,
303314 longLine: false ,
304315 style: HorizontalBarrierStyle (
305- color: configModel.theme
306- is ChartDefaultLightTheme
316+ color: isLightMode
307317 ? Colors .black
308318 : Colors .white,
309319 hasArrow: false ,
310320 textStyle: TextStyle (
311321 fontSize: 12 ,
312322 height: 1.3 ,
313323 fontWeight: FontWeight .w600,
314- color: configModel.theme
315- is ChartDefaultLightTheme
324+ color: isLightMode
316325 ? Colors .white
317326 : Colors .black,
318327 fontFeatures: const < FontFeature > [
0 commit comments