Apply suggestions from code review

Co-authored-by: Alejandro Santiago <dev@alestiago.com>
pull/341/head
Erick 3 years ago committed by Erick Zanardo
parent d24a77f04b
commit 2eeffb76a7

@ -1,7 +1,7 @@
part of 'backbox_bloc.dart'; part of 'backbox_bloc.dart';
/// {@template backbox_event} /// {@template backbox_event}
/// Base class for backbox events /// Base class for backbox events.
/// {@endtemplate} /// {@endtemplate}
abstract class BackboxEvent extends Equatable { abstract class BackboxEvent extends Equatable {
/// {@macro backbox_event} /// {@macro backbox_event}
@ -9,7 +9,7 @@ abstract class BackboxEvent extends Equatable {
} }
/// {@template player_initials_requested} /// {@template player_initials_requested}
/// Event that triggers the user initials display /// Event that triggers the user initials display.
/// {@endtemplate} /// {@endtemplate}
class PlayerInitialsRequested extends BackboxEvent { class PlayerInitialsRequested extends BackboxEvent {
/// {@template player_initials_requested} /// {@template player_initials_requested}
@ -18,10 +18,10 @@ class PlayerInitialsRequested extends BackboxEvent {
required this.character, required this.character,
}); });
/// Player's score /// Player's score.
final int score; final int score;
/// Player's character /// Player's character.
final CharacterTheme character; final CharacterTheme character;
@override @override
@ -29,7 +29,7 @@ class PlayerInitialsRequested extends BackboxEvent {
} }
/// {@template player_initials_submited} /// {@template player_initials_submited}
/// Event that submits the user score and initials /// Event that submits the user score and initials.
/// {@endtemplate} /// {@endtemplate}
class PlayerInitialsSubmited extends BackboxEvent { class PlayerInitialsSubmited extends BackboxEvent {
/// {@template player_initials_requested} /// {@template player_initials_requested}
@ -39,13 +39,13 @@ class PlayerInitialsSubmited extends BackboxEvent {
required this.character, required this.character,
}); });
/// Player's score /// Player's score.
final int score; final int score;
/// Player's initials /// Player's initials.
final String initials; final String initials;
/// Player's character /// Player's character.
final CharacterTheme character; final CharacterTheme character;
@override @override

@ -1,39 +1,39 @@
part of 'backbox_bloc.dart'; part of 'backbox_bloc.dart';
/// {@template backbox_state} /// {@template backbox_state}
/// The base state for all [BackboxState] /// The base state for all [BackboxState].
/// {@endtemplate backbox_state} /// {@endtemplate backbox_state}
abstract class BackboxState extends Equatable { abstract class BackboxState extends Equatable {
/// {@macro backbox_state} /// {@macro backbox_state}
const BackboxState(); const BackboxState();
} }
/// Loading state for the backbox /// Loading state for the backbox.
class LoadingState extends BackboxState { class LoadingState extends BackboxState {
@override @override
List<Object?> get props => []; List<Object?> get props => [];
} }
/// Failure state for the backbox /// Failure state for the backbox.
class FailureState extends BackboxState { class FailureState extends BackboxState {
@override @override
List<Object?> get props => []; List<Object?> get props => [];
} }
/// State when the leaderboard was successfully loaded /// State when the leaderboard was successfully loaded.
class LeaderboardSuccessState extends BackboxState { class LeaderboardSuccessState extends BackboxState {
@override @override
List<Object?> get props => []; List<Object?> get props => [];
} }
/// State when the leaderboard was successfully loaded /// State when the leaderboard was successfully loaded.
class LeaderboardFailureState extends BackboxState { class LeaderboardFailureState extends BackboxState {
@override @override
List<Object?> get props => []; List<Object?> get props => [];
} }
/// {@template initials_form_state} /// {@template initials_form_state}
/// State when the user is inputting their initials /// State when the user is inputting their initials.
/// {@endtemplate} /// {@endtemplate}
class InitialsFormState extends BackboxState { class InitialsFormState extends BackboxState {
/// {@macro initials_form_state} /// {@macro initials_form_state}
@ -42,17 +42,17 @@ class InitialsFormState extends BackboxState {
required this.character, required this.character,
}) : super(); }) : super();
/// Player's score /// Player's score.
final int score; final int score;
/// Player's character /// Player's character.
final CharacterTheme character; final CharacterTheme character;
@override @override
List<Object?> get props => [score, character]; List<Object?> get props => [score, character];
} }
/// State when the leaderboard was successfully loaded /// State when the leaderboard was successfully loaded.
class InitialsSuccessState extends BackboxState { class InitialsSuccessState extends BackboxState {
@override @override
List<Object?> get props => []; List<Object?> get props => [];

@ -13,7 +13,7 @@ final _bodyTextPaint = TextPaint(
); );
/// {@template initials_submission_success_display} /// {@template initials_submission_success_display}
/// Display when the initials were successfully submitted /// Display when the initials were successfully submitted.
/// {@endtemplate} /// {@endtemplate}
class InitialsSubmissionSuccessDisplay extends TextComponent class InitialsSubmissionSuccessDisplay extends TextComponent
with HasGameRef<PinballGame> { with HasGameRef<PinballGame> {

@ -14,10 +14,10 @@ final _bodyTextPaint = TextPaint(
); );
/// {@template loading_display} /// {@template loading_display}
/// Display used to show the loading animation /// Display used to show the loading animation.
/// {@endtemplate} /// {@endtemplate}
class LoadingDisplay extends TextComponent with HasGameRef<PinballGame> { class LoadingDisplay extends TextComponent with HasGameRef<PinballGame> {
/// {@template loading_display /// {@template loading_display}
LoadingDisplay({AppLocalizations? l10n}) : _l10n = l10n; LoadingDisplay({AppLocalizations? l10n}) : _l10n = l10n;
final AppLocalizations? _l10n; final AppLocalizations? _l10n;

Loading…
Cancel
Save