|
|
@ -1,20 +1,16 @@
|
|
|
|
|
|
|
|
// ignore_for_file: public_member_api_docs
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:bloc/bloc.dart';
|
|
|
|
import 'package:bloc/bloc.dart';
|
|
|
|
|
|
|
|
|
|
|
|
part 'google_letter_state.dart';
|
|
|
|
part 'google_letter_state.dart';
|
|
|
|
|
|
|
|
|
|
|
|
// TODO(alestiago): Evaluate if there is any useful documentation that could
|
|
|
|
|
|
|
|
// be added to this class.
|
|
|
|
|
|
|
|
// ignore: public_member_api_docs
|
|
|
|
|
|
|
|
class GoogleLetterCubit extends Cubit<GoogleLetterState> {
|
|
|
|
class GoogleLetterCubit extends Cubit<GoogleLetterState> {
|
|
|
|
// ignore: public_member_api_docs
|
|
|
|
|
|
|
|
GoogleLetterCubit() : super(GoogleLetterState.inactive);
|
|
|
|
GoogleLetterCubit() : super(GoogleLetterState.inactive);
|
|
|
|
|
|
|
|
|
|
|
|
/// Event added when the letter contacts with a ball.
|
|
|
|
|
|
|
|
void onBallContacted() {
|
|
|
|
void onBallContacted() {
|
|
|
|
emit(GoogleLetterState.active);
|
|
|
|
emit(GoogleLetterState.active);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Event added when the letter should return to its initial configuration.
|
|
|
|
|
|
|
|
void onReset() {
|
|
|
|
void onReset() {
|
|
|
|
emit(GoogleLetterState.inactive);
|
|
|
|
emit(GoogleLetterState.inactive);
|
|
|
|
}
|
|
|
|
}
|
|
|
|