refactor: remove local variable

pull/93/head
Allison Ryan 4 years ago
parent 5f2cbe5a59
commit d22c795f10

@ -84,10 +84,13 @@ class BonusWord extends Component with BlocComponent<GameBloc, GameState> {
Vector2(-2.88, 1.75), Vector2(-2.88, 1.75),
]; ];
final mirroredOffsets = offsets.reversed offsets.addAll(
.map((position) => Vector2(-position.x, position.y)) offsets.reversed
.toList(); .map(
offsets.addAll(mirroredOffsets); (offset) => Vector2(-offset.x, offset.y),
)
.toList(),
);
assert(offsets.length == GameBloc.bonusWord.length, 'Invalid positions'); assert(offsets.length == GameBloc.bonusWord.length, 'Invalid positions');
final letters = <BonusLetter>[]; final letters = <BonusLetter>[];

Loading…
Cancel
Save