diff --git a/packages/sensors/example/lib/snake.dart b/packages/sensors/example/lib/snake.dart index afa12e377c48..47177681020f 100644 --- a/packages/sensors/example/lib/snake.dart +++ b/packages/sensors/example/lib/snake.dart @@ -99,10 +99,10 @@ class SnakeState extends State { final math.Point? newDirection = currentAcceleration == null ? null : currentAcceleration.x.abs() < 1.0 && currentAcceleration.y.abs() < 1.0 - ? null - : (currentAcceleration.x.abs() < currentAcceleration.y.abs()) - ? math.Point(0, currentAcceleration.y.sign.toInt()) - : math.Point(-currentAcceleration.x.sign.toInt(), 0); + ? null + : (currentAcceleration.x.abs() < currentAcceleration.y.abs()) + ? math.Point(0, currentAcceleration.y.sign.toInt()) + : math.Point(-currentAcceleration.x.sign.toInt(), 0); state.step(newDirection); } }