Skip to content

Commit

Permalink
[sensors] format dart code based on the new dart formatter (flutter#3809
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Chris Yang authored Apr 15, 2021
1 parent b548ae1 commit 0892a2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/sensors/example/lib/snake.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ class SnakeState extends State<Snake> {
final math.Point<int>? newDirection = currentAcceleration == null
? null
: currentAcceleration.x.abs() < 1.0 && currentAcceleration.y.abs() < 1.0
? null
: (currentAcceleration.x.abs() < currentAcceleration.y.abs())
? math.Point<int>(0, currentAcceleration.y.sign.toInt())
: math.Point<int>(-currentAcceleration.x.sign.toInt(), 0);
? null
: (currentAcceleration.x.abs() < currentAcceleration.y.abs())
? math.Point<int>(0, currentAcceleration.y.sign.toInt())
: math.Point<int>(-currentAcceleration.x.sign.toInt(), 0);
state.step(newDirection);
}
}
Expand Down

0 comments on commit 0892a2d

Please sign in to comment.