fix: rebase

pull/28/head
Erick Zanardo 4 years ago
parent 5f63abac7a
commit 5f0bf0ea5f

@ -107,7 +107,6 @@ class PinballGame extends Forge2DGame
}
class DebugPinballGame extends PinballGame with TapDetector {
DebugPinballGame({required PinballTheme theme}) : super(theme: theme);
@override

@ -30,8 +30,11 @@ class PinballGamePage extends StatelessWidget {
}
class PinballGameView extends StatefulWidget {
const PinballGameView({Key? key, required this.theme, bool isDebugMode = kDebugMode})
: _isDebugMode = isDebugMode,
const PinballGameView({
Key? key,
required this.theme,
bool isDebugMode = kDebugMode,
}) : _isDebugMode = isDebugMode,
super(key: key);
final PinballTheme theme;
@ -51,7 +54,9 @@ class _PinballGameViewState extends State<PinballGameView> {
// TODO(erickzanardo): Revisit this when we start to have more assets
// this could expose a Stream (maybe even a cubit?) so we could show the
// the loading progress with some fancy widgets.
_game = (widget._isDebugMode ? DebugPinballGame(theme: widget.theme) : PinballGame(theme: widget.theme))
_game = (widget._isDebugMode
? DebugPinballGame(theme: widget.theme)
: PinballGame(theme: widget.theme))
..preLoadAssets();
}

@ -12,7 +12,7 @@ void main() {
group('PinballGame', () {
TestWidgetsFlutterBinding.ensureInitialized();
final flameTester = FlameTester(PinballGameTest.create);
final debugModeFlameTester = FlameTester(DebugPinballGame.new);
final debugModeFlameTester = FlameTester(DebugPinballGameX.initial);
// TODO(alestiago): test if [PinballGame] registers
// [BallScorePointsCallback] once the following issue is resolved:

@ -113,7 +113,7 @@ void main() {
);
await tester.pumpApp(
const PinballGameView(isDebugMode: false),
const PinballGameView(theme: theme, isDebugMode: false),
gameBloc: gameBloc,
);
expect(
@ -133,7 +133,7 @@ void main() {
);
await tester.pumpApp(
const PinballGameView(),
const PinballGameView(theme: theme),
gameBloc: gameBloc,
);
expect(

Loading…
Cancel
Save