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

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

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

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

Loading…
Cancel
Save