mirror of https://github.com/flutter/pinball.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
530 B
27 lines
530 B
3 years ago
|
part of 'game_bloc.dart';
|
||
|
|
||
|
@immutable
|
||
|
abstract class GameEvent extends Equatable {
|
||
|
const GameEvent();
|
||
|
}
|
||
|
|
||
|
/// Event added when a user drops a ball off the screen.
|
||
|
class BallLost extends GameEvent {
|
||
|
const BallLost();
|
||
|
|
||
|
@override
|
||
|
List<Object?> get props => [];
|
||
|
}
|
||
|
|
||
|
/// Event added when a user increases their score.
|
||
|
class Scored extends GameEvent {
|
||
|
const Scored({
|
||
|
required this.points,
|
||
|
}) : assert(points > 0, 'Points must be greater than 0');
|
||
|
|
||
|
final int points;
|
||
|
|
||
|
@override
|
||
|
List<Object?> get props => [points];
|
||
|
}
|