mirror of https://github.com/flutter/pinball.git
parent
cc3ba899ce
commit
058549cd39
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1,17 @@
|
||||
// ignore_for_file: public_member_api_docs
|
||||
|
||||
import 'package:bloc/bloc.dart';
|
||||
|
||||
part 'kicker_state.dart';
|
||||
|
||||
class KickerCubit extends Cubit<KickerState> {
|
||||
KickerCubit() : super(KickerState.dimmed);
|
||||
|
||||
void onBallContacted() {
|
||||
emit(KickerState.lit);
|
||||
}
|
||||
|
||||
void onBlinked() {
|
||||
emit(KickerState.dimmed);
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
// ignore_for_file: public_member_api_docs
|
||||
|
||||
part of 'kicker_cubit.dart';
|
||||
|
||||
enum KickerState {
|
||||
lit,
|
||||
dimmed,
|
||||
}
|
Loading…
Reference in new issue