File tree Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,25 @@ class MainWidgetState extends State<MainWidget> {
39
39
child: Column (
40
40
mainAxisAlignment: MainAxisAlignment .center,
41
41
children: < Widget > [
42
- TextButton (
43
- onPressed: () { },
44
- child: const Text ('Text button' ),
42
+ Row (
43
+ mainAxisAlignment: MainAxisAlignment .center,
44
+ children: < Widget > [
45
+ const Text ('This is a TextButton:' ),
46
+ TextButton (
47
+ onPressed: () { },
48
+ child: const Text ('Action' ),
49
+ ),
50
+ ],
45
51
),
46
- const TextButton (
47
- onPressed: null ,
48
- child: Text ('Text button disabled' ),
52
+ const Row (
53
+ mainAxisAlignment: MainAxisAlignment .center,
54
+ children: < Widget > [
55
+ Text ('This is a disabled TextButton:' ),
56
+ TextButton (
57
+ onPressed: null ,
58
+ child: Text ('Action' ),
59
+ ),
60
+ ],
49
61
),
50
62
],
51
63
),
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import 'test_utils.dart';
10
10
void main () {
11
11
testWidgets ('text button can run' , (WidgetTester tester) async {
12
12
await pumpsUseCase (tester, TextButtonUseCase ());
13
- expect (find.text ('Text button' ), findsOneWidget);
14
- expect (find.text ('Text button disabled' ), findsOneWidget);
13
+ expect (find.text ('Action' ), findsExactly (2 ));
15
14
});
16
15
}
You can’t perform that action at this time.
0 commit comments