diff --git a/dev/a11y_assessments/lib/use_cases/text_button.dart b/dev/a11y_assessments/lib/use_cases/text_button.dart index e9f240fa74faf..ee83bf989f880 100644 --- a/dev/a11y_assessments/lib/use_cases/text_button.dart +++ b/dev/a11y_assessments/lib/use_cases/text_button.dart @@ -39,13 +39,25 @@ class MainWidgetState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - TextButton( - onPressed: () { }, - child: const Text('Text button'), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text('This is a TextButton:'), + TextButton( + onPressed: () { }, + child: const Text('Action'), + ), + ], ), - const TextButton( - onPressed: null, - child: Text('Text button disabled'), + const Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('This is a disabled TextButton:'), + TextButton( + onPressed: null, + child: Text('Action'), + ), + ], ), ], ), diff --git a/dev/a11y_assessments/test/text_button_test.dart b/dev/a11y_assessments/test/text_button_test.dart index 31309d5981ca0..e3cbd1e9ae58f 100644 --- a/dev/a11y_assessments/test/text_button_test.dart +++ b/dev/a11y_assessments/test/text_button_test.dart @@ -10,7 +10,6 @@ import 'test_utils.dart'; void main() { testWidgets('text button can run', (WidgetTester tester) async { await pumpsUseCase(tester, TextButtonUseCase()); - expect(find.text('Text button'), findsOneWidget); - expect(find.text('Text button disabled'), findsOneWidget); + expect(find.text('Action'), findsExactly(2)); }); }