New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve focus example #147464
improve focus example #147464
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits 👍
Thanks for helping to test these examples!
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
<#147464 (comment)>:
> +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
<#147464 (comment)>:
> + });
+ testWidgets('builds list showcasing focus traversal',
Needs a newline here between the tests.
—
Reply to this email directly, view it on GitHub
<#147464 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BH7GFSCGO5HQ3KUHJYER533ZAALFLAVCNFSM6AAAAABG4DJH6KVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMZSGY4DENJXG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
7769c6a
to
635c69e
Compare
Can someone rerun Google testing? |
Done, but it looks like there are merge conflicts anyhow. |
Part of #130459. Adds a test to the second focus example and makes the function of the example more clear.
Pre-launch Checklist
///
).