We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b548ae1 commit 0892a2dCopy full SHA for 0892a2d
packages/sensors/example/lib/snake.dart
@@ -99,10 +99,10 @@ class SnakeState extends State<Snake> {
99
final math.Point<int>? newDirection = currentAcceleration == null
100
? null
101
: currentAcceleration.x.abs() < 1.0 && currentAcceleration.y.abs() < 1.0
102
- ? null
103
- : (currentAcceleration.x.abs() < currentAcceleration.y.abs())
104
- ? math.Point<int>(0, currentAcceleration.y.sign.toInt())
105
- : 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);
106
state.step(newDirection);
107
}
108
0 commit comments