I tried skipOffstage: false (expect(find.byType(MainPage, skipOffstage: false), findsOneWidget);), but that didn't help. This might not be a flutter_pref issue, but until I find out more about it I wanted to document it, maybe someone came across to it and knows a workaround.
In my latest project I used VGV CLI to scaffold the app structure. The MainPage's test looks like this:
This passes, when the
App
is likehowever when I introduce
PrefService
, the test fails:I tried
skipOffstage: false
(expect(find.byType(MainPage, skipOffstage: false), findsOneWidget);
), but that didn't help. This might not be aflutter_pref
issue, but until I find out more about it I wanted to document it, maybe someone came across to it and knows a workaround.