Skip to content

[syncfusion_flutter_charts] Null check operator used on a null value #1167

@Oleksii-Milkov

Description

@Oleksii-Milkov

Flutter version: 3.7.7
Min Dart sdk in project: 2.7.0

syncfusion_flutter_charts: 21.1.39

I have this error after hot reload or after folding and opening app from background (If chart is visible).

The following _CastError was thrown building LayoutBuilder:
Null check operator used on a null value

The relevant error-causing widget was:
SfCartesianChart SfCartesianChart:file:///home/oleksii/StudioProjects/InvoiceCopy%20(copy)/lib/pages/reports_page/widgets/cupertino/widgets/cupertino_payments_chart.dart:35:16
When the exception was thrown, this was the stack:
#0 ChartSeriesPanel._needAxisAnimation (package:syncfusion_flutter_charts/src/chart/base/series_base.dart:103:66)
#1 ChartSeriesPanel._populateDataPoints (package:syncfusion_flutter_charts/src/chart/base/series_base.dart:261:23)
#2 ChartSeriesPanel.processData (package:syncfusion_flutter_charts/src/chart/base/series_base.dart:90:7)
#3 _ContainerAreaState._calculateBounds (package:syncfusion_flutter_charts/src/chart/base/chart_base.dart:2573:41)
#4 _ContainerAreaState._initializeChart (package:syncfusion_flutter_charts/src/chart/base/chart_base.dart:2557:5)
#5 _ContainerAreaState.build. (package:syncfusion_flutter_charts/src/chart/base/chart_base.dart:2548:34)
#6 _LayoutBuilderElement._layout.layoutCallback (package:flutter/src/widgets/layout_builder.dart:119:77)
#7 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2682:19)

As i noticed it happens when i am trying to set visibleMinimum or visibleMaximum properties inside DateTimeCategoryAxis. If this properties empty - everything works fine

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