我有类似的东西:
class _RootPageState extends State<RootPage> {
@override
Widget build(BuildContext context) {
return StreamBuilder(
key: Key("rootStreamBuilder"),
stream: _bloc.loadRootPage,
builder: (context, snapshot) {
if (snapshot.hasData) {
...
});
我要测试此StreamBuilder,如何从此类中推断?这样我可以做类似的事情:
testWidgets("test", (WidgetTester tester) async {
await tester.pumpWidget(new MaterialApp(
home: StreamBuilder
...