Skip to content

[syncfusion_flutter_charts] Null safety migration bug in CircularSeriesRendererExtension #834

@bambinoua

Description

@bambinoua

I use SfCircularChart in my project. When I switch from light mode to dark mode or vise versa I have the exception:

Unexpected Null value

index

As you may see you compare point.startAngle! with oldStartAngle! but oldStartAngle is null. So we have a crash in the file /lib/src/circular_chart/renderer/renderer_extension.dart

I noticed that this crash is occurrend when I use my own legendItemBuilder. And moreover the prototype of legendItemBuilder is

legendItemBuilder: (legendText, series, point, seriesIndex) {
  print(series); // <--- returns `Instance of 'DoughnutSeriesRendererExtension'`
  return MyWidget();
}

I am confident the other value it should be printed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions