We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c800b15 commit e4bb7ddCopy full SHA for e4bb7dd
lib/chart/render/decorations/spark_line_decoration.dart
@@ -136,8 +136,10 @@ class SparkLineDecoration extends DecorationPainter {
136
_positions.add(Offset(_itemWidth * key + _position, 0.0));
137
}
138
139
- _positions.add(Offset(_itemWidth * key + _position,
140
- size.height - ((value.max ?? 0.0) - state.data.minValue) * scale));
+ if (value.max != null) {
+ _positions.add(Offset(_itemWidth * key + _position,
141
+ size.height - ((value.max ?? 0.0) - state.data.minValue) * scale));
142
+ }
143
144
if (fill && state.data.items[listIndex].length - 1 == key) {
145
0 commit comments