|
|
@ -22,23 +22,33 @@ class StartGameState extends Equatable {
|
|
|
|
/// {@macro start_game_state}
|
|
|
|
/// {@macro start_game_state}
|
|
|
|
const StartGameState({
|
|
|
|
const StartGameState({
|
|
|
|
required this.status,
|
|
|
|
required this.status,
|
|
|
|
|
|
|
|
this.restarted = false,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
/// Initial [StartGameState].
|
|
|
|
/// Initial [StartGameState].
|
|
|
|
const StartGameState.initial() : this(status: StartGameStatus.initial);
|
|
|
|
const StartGameState.initial()
|
|
|
|
|
|
|
|
: this(
|
|
|
|
|
|
|
|
status: StartGameStatus.initial,
|
|
|
|
|
|
|
|
restarted: false,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/// Status of [StartGameState].
|
|
|
|
/// Status of [StartGameState].
|
|
|
|
final StartGameStatus status;
|
|
|
|
final StartGameStatus status;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Game has been restarted from game over screen.
|
|
|
|
|
|
|
|
final bool restarted;
|
|
|
|
|
|
|
|
|
|
|
|
/// Creates a copy of [StartGameState].
|
|
|
|
/// Creates a copy of [StartGameState].
|
|
|
|
StartGameState copyWith({
|
|
|
|
StartGameState copyWith({
|
|
|
|
StartGameStatus? status,
|
|
|
|
StartGameStatus? status,
|
|
|
|
|
|
|
|
bool? restarted,
|
|
|
|
}) {
|
|
|
|
}) {
|
|
|
|
return StartGameState(
|
|
|
|
return StartGameState(
|
|
|
|
status: status ?? this.status,
|
|
|
|
status: status ?? this.status,
|
|
|
|
|
|
|
|
restarted: restarted ?? this.restarted,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
List<Object> get props => [status];
|
|
|
|
List<Object> get props => [status, restarted];
|
|
|
|
}
|
|
|
|
}
|
|
|
|