Skip to content

Commit

Permalink
Migrate path_extensions, canvas_extensions, touch_input
Browse files Browse the repository at this point in the history
  • Loading branch information
imaNNeo committed Mar 3, 2021
1 parent 8a3491a commit 54cb96d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions lib/src/chart/base/base_chart/touch_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class FlLongPressStart extends FlTouchLongInput with EquatableMixin {
}

@override
List<Object> get props => [
List<Object?> get props => [
localPosition,
];
}
Expand All @@ -54,7 +54,7 @@ class FlLongPressMoveUpdate extends FlTouchLongInput with EquatableMixin {
}

@override
List<Object> get props => [
List<Object?> get props => [
localPosition,
];
}
Expand All @@ -77,7 +77,7 @@ class FlLongPressEnd extends FlTouchLongInput with EquatableMixin {
}

@override
List<Object> get props => [
List<Object?> get props => [
localPosition,
];
}
Expand All @@ -103,7 +103,7 @@ class FlPanStart extends FlTouchNormalInput with EquatableMixin {
}

@override
List<Object> get props => [
List<Object?> get props => [
localPosition,
];
}
Expand All @@ -126,7 +126,7 @@ class FlPanMoveUpdate extends FlTouchNormalInput with EquatableMixin {
}

@override
List<Object> get props => [
List<Object?> get props => [
localPosition,
];
}
Expand All @@ -153,7 +153,7 @@ class FlPanEnd extends FlTouchNormalInput with EquatableMixin {
}

@override
List<Object> get props => [
List<Object?> get props => [
localPosition,
velocity,
];
Expand Down
2 changes: 1 addition & 1 deletion lib/src/extensions/canvas_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:fl_chart/src/utils/canvas_wrapper.dart';
/// Defines extensions on the [CanvasWrapper]
extension DashedLine on CanvasWrapper {
/// Draws a dashed line from passed in offsets
void drawDashedLine(Offset from, Offset to, Paint painter, List<int> dashArray) {
void drawDashedLine(Offset from, Offset to, Paint painter, List<int>? dashArray) {
var path = Path();
path.moveTo(from.dx, from.dy);
path.lineTo(to.dx, to.dy);
Expand Down
4 changes: 2 additions & 2 deletions lib/src/extensions/path_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ extension DashedPath on Path {
/// it is a circular array of dash offsets and lengths.
/// For example, the array `[5, 10]` would result in dashes 5 pixels long
/// followed by blank spaces 10 pixels long.
Path toDashedPath(List<int> dashArray) {
if (this != null && dashArray != null) {
Path toDashedPath(List<int>? dashArray) {
if (dashArray != null) {
final castedArray = dashArray.map((value) => value.toDouble()).toList();
final dashedPath = dashPath(this, dashArray: CircularIntervalList<double>(castedArray));

Expand Down

0 comments on commit 54cb96d

Please sign in to comment.