Apply suggestions from code review

Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com>
pull/187/head
Erick 3 years ago committed by GitHub
parent 5ea0c126ad
commit 5dfb171130
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -55,7 +55,7 @@ class Backboard extends PositionComponent with HasGameRef {
/// Puts the Backboard in waiting mode, where the scoreboard is shown.
Future<void> waitingMode() async {
children.removeWhere((element) => true);
children.removeWhere((_) => true);
await add(BackboardWaiting());
}
@ -64,7 +64,7 @@ class Backboard extends PositionComponent with HasGameRef {
required int score,
BackboardOnSubmit? onSubmit,
}) async {
children.removeWhere((element) => true);
children.removeWhere((_) => true);
await add(
BackboardGameOver(
score: score,

@ -5,7 +5,7 @@ import 'package:flutter/services.dart';
typedef KeyHandlerCallback = bool Function();
/// {@template keyboard_input_controller}
/// A that receives keyboard input and execute registered methods
/// A [Component] that receives keyboard input and executes registered methods.
/// {@endtemplate}
class KeyboardInputController extends Component with KeyboardHandler {
/// {@macro keyboard_input_controller}

@ -101,7 +101,7 @@ void main() {
String? submitedInitials;
tester.testGameWidget(
'submits the initial',
'submits the initials',
setUp: (game, tester) async {
final backboard = Backboard.gameOver(
position: Vector2(0, 15),
@ -147,7 +147,7 @@ void main() {
);
tester.testGameWidget(
"does nothing when don't have focus",
"does nothing when it doesn't have focus",
setUp: (game, tester) async {
await game.ensureAdd(
BackboardLetterPrompt(position: Vector2.zero()),
@ -162,7 +162,7 @@ void main() {
);
tester.testGameWidget(
'blinks the promp when have focus',
'blinks the prompt when it has the focus',
setUp: (game, tester) async {
await game.ensureAdd(
BackboardLetterPrompt(position: Vector2.zero(), hasFocus: true),

Loading…
Cancel
Save