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.
18 lines
460 B
18 lines
460 B
3 years ago
|
import 'package:flame_test/flame_test.dart';
|
||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||
|
import 'package:pinball/game/game.dart';
|
||
|
|
||
|
FlameTester flameBlocTester({required GameBloc Function() gameBlocBuilder}) {
|
||
|
return FlameTester(
|
||
|
PinballGame.new,
|
||
|
pumpWidget: (gameWidget, tester) async {
|
||
|
await tester.pumpWidget(
|
||
|
BlocProvider.value(
|
||
|
value: gameBlocBuilder(),
|
||
|
child: gameWidget,
|
||
|
),
|
||
|
);
|
||
|
},
|
||
|
);
|
||
|
}
|