flutter icon indicating copy to clipboard operation
flutter copied to clipboard

improve focus example

Open derdilla opened this issue 9 months ago • 1 comments

Part of #130459. Adds a test to the second focus example and makes the function of the example more clear.

Pre-launch Checklist

derdilla avatar Apr 27 '24 13:04 derdilla

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: @.***>

A111one avatar Apr 30 '24 23:04 A111one

Can someone rerun Google testing?

derdilla avatar May 05 '24 12:05 derdilla

Can someone rerun Google testing?

Done, but it looks like there are merge conflicts anyhow.

gspencergoog avatar May 07 '24 01:05 gspencergoog