flutter
flutter copied to clipboard
improve focus example
Part of #130459. Adds a test to the second focus example and makes the function of the example more clear.
Pre-launch Checklist
- [X] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [X] I read the Tree Hygiene wiki page, which explains my responsibilities.
- [X] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
- [X] I signed the CLA.
- [X] I listed at least one issue that this PR fixes in the description above.
- [X] I updated/added relevant documentation (doc comments with
///
). - [X] I added new tests to check the change I am making, or this PR is test-exempt.
- [X] I followed the breaking change policy and added Data Driven Fixes where supported.
- [X] All existing and new tests are passing.
Welcome
On Wed, 1 May 2024, 3:27 am Justin McCandless, @.***> wrote:
@.**** approved this pull request.
LGTM with nits 👍
Thanks for helping to test these examples!
In examples/api/test/widgets/focus_scope/focus.1_test.dart https://github.com/flutter/flutter/pull/147464#discussion_r1585609112:
+import 'package:flutter_api_samples/widgets/focus_scope/focus.1.dart'
- as example; +import 'package:flutter_test/flutter_test.dart';
+void main() {
- testWidgets('FocusableText shows content and color depending on focus',
(WidgetTester tester) async {
- await tester.pumpWidget(const MaterialApp(
home: Scaffold(
body: example.FocusableText(
'Item 0',
autofocus: false,
),
),
- ));
- // Autofocus needs to check no other node in the [FocusScope] is focused and
Super nit for readability: "needs to check no" => "needs to check that no"
In examples/api/test/widgets/focus_scope/focus.1_test.dart https://github.com/flutter/flutter/pull/147464#discussion_r1585609479:
- });
- testWidgets('builds list showcasing focus traversal',
Needs a newline here between the tests.
— Reply to this email directly, view it on GitHub https://github.com/flutter/flutter/pull/147464#pullrequestreview-2032682577, or unsubscribe https://github.com/notifications/unsubscribe-auth/BH7GFSCGO5HQ3KUHJYER533ZAALFLAVCNFSM6AAAAABG4DJH6KVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMZSGY4DENJXG4 . You are receiving this because you commented.Message ID: @.***>
Can someone rerun Google testing?
Can someone rerun Google testing?
Done, but it looks like there are merge conflicts anyhow.