我正在尝试一些抖动功能,并且我的widget_test.dart文件出现错误,我被卡住了
这是Widget_test.dart文件代码:
void main()
{
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
await tester.pumpWidget((MyApp());
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}