I have something like:
class _RootPageState extends State<RootPage> {
@override
Widget build(BuildContext context) {
return StreamBuilder(
key: Key("rootStreamBuilder"),
stream: _bloc.loadRootPage,
builder: (context, snapshot) {
if (snapshot.hasData) {
...
});
I want to test this StreamBuilder, how can I extrapulate from this class? So that I can do something like:
testWidgets("test", (WidgetTester tester) async {
await tester.pumpWidget(new MaterialApp(
home: StreamBuilder
...
Aucun commentaire:
Enregistrer un commentaire