function test widget is not defined code example
Example: void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. await tester.pumpWidget(MyApp());
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stateless/another_file.dart';
void main() {
testWidgets('My test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
});
}