Repository: flutter
Issue: [Desktop] Focus traverses cached offscreen ListView items
Labels: framework,f: scrolling,c: proposal,f: focus,P2,team-framework,triaged-framework

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

1. Run the attached app
2. Press `<TAB>` to focus the first list item
3. Press `<Shift> + <TAB>` to traverse focus backwards to the last list item
4. Repeatedly press `<Shift> + <TAB>` and observe the debug output

**Expected results:** <!-- what did you want to see? -->

Ideally, the list would scroll all the way at the bottom and focus would wrap around the entire list, but this may be difficult to achieve as list items outside the cache don't exist.

The second-best solution would be to wrap the focus around to the last _visible_ item and ignore the cached offscreen items.

**Actual results:** <!-- what did you see? -->

It may take half a dozen or more steps to get the focus back on the screen as it traverses through invisible cached items.

<details>
<summary>Code sample</summary>

<!--
      Please create a minimal reproducible sample that shows the problem
      and attach it below between the lines with the backticks.

      To create it you can use `flutter create bug` command and update the `main.dart` file.

      Alternatively, you can use https://dartpad.dev/
      which is capable of creating and running small Flutter apps.

      Without this we will unlikely be able to progress on the issue, and because of that
      we regretfully will have to close it.
-->

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MaterialApp(home: MyHomePage()));

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final _itemNodes = <int, FocusNode>{};

  @override
  void initState() {
    super.initState();

    FocusManager.instance.addListener(() {
      print('focus change: ${FocusManager.instance.primaryFocus?.debugLabel}');
    });
  }

  @override
  void dispose() {
    for (final node in _itemNodes.values) {
      node.dispose();
    }
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Focus traversal'),
      ),
      body: ListView.builder(
        itemCount: 50,
        itemBuilder: (context, i) {
          return ListTile(
            onTap: () {},
            focusNode: _itemNodes[i] ??= FocusNode(debugLabel: 'ITEM $i'),
            title: Text('Item $i'),
          );
        },
      ),
    );
  }
}
```

</details>

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```
[  +36 ms] executing: uname -m
[  +17 ms] Exit code 0 from: uname -m
[        ] x86_64
[   +3 ms] executing: [/home/jpnurmi/Flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +3 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 5fd1d36ecc6750302beebf73683d4a6977603abe
[        ] executing: [/home/jpnurmi/Flutter/] git tag --points-at 5fd1d36ecc6750302beebf73683d4a6977603abe
[   +9 ms] Exit code 0 from: git tag --points-at 5fd1d36ecc6750302beebf73683d4a6977603abe
[   +1 ms] executing: [/home/jpnurmi/Flutter/] git describe --match *.*.* --long --tags 5fd1d36ecc6750302beebf73683d4a6977603abe
[  +26 ms] Exit code 0 from: git describe --match *.*.* --long --tags 5fd1d36ecc6750302beebf73683d4a6977603abe
[        ] 2.6.0-11.0.pre-322-g5fd1d36ecc
[   +5 ms] executing: [/home/jpnurmi/Flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] upstream/master
[        ] executing: [/home/jpnurmi/Flutter/] git ls-remote --get-url upstream
[   +4 ms] Exit code 0 from: git ls-remote --get-url upstream
[        ] https://github.com/flutter/flutter.git
[  +62 ms] Unable to locate an Android SDK.
[   +4 ms] executing: [/home/jpnurmi/Flutter/] git rev-parse --abbrev-ref HEAD
[   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[  +60 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +54 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +61 ms] Skipping pub get: version match.
[  +79 ms] Generating /home/jpnurmi/Temp/focus_traversal/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +58 ms] Initializing file store
[   +6 ms] Skipping target: gen_localizations
[   +4 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
/home/jpnurmi/Temp/focus_traversal/.dart_tool/package_config_subset}
[  +14 ms] gen_dart_plugin_registrant: Complete
[        ] Skipping target: _composite
[   +1 ms] complete
[   +3 ms] Launching lib/main.dart on Linux in debug mode...
[   +3 ms] /home/jpnurmi/Flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/jpnurmi/Flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root
/home/jpnurmi/Flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata
-DFLUTTER_WEB_AUTO_DETECT=true --output-dill /tmp/flutter_tools.BSJVOQ/flutter_tool.DAGKZT/app.dill --packages /home/jpnurmi/Temp/focus_traversal/.dart_tool/package_config.json
-Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build/c075001b96339384a97db4862b8ab8db.cache.dill.track.dill --flutter-widget-cache --enable-experiment=alternative-invalidation-strategy
[  +17 ms] Building Linux application...
[  +16 ms] <- compile package:focus_traversal/main.dart
[   +1 ms] executing: [build/linux/x64/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DFLUTTER_TARGET_PLATFORM=linux-x64 /home/jpnurmi/Temp/focus_traversal/linux
[  +27 ms] -- Configuring done
[   +1 ms] -- Generating done
[   +9 ms] -- Build files have been written to: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug
[   +6 ms] executing: ninja -C build/linux/x64/debug install
[  +12 ms] ninja: Entering directory `build/linux/x64/debug'
[+8151 ms] [1/5] Generating /home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/libflutter_linux_gtk.so,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h, /home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_engine.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h, /home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_method_call.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h, /home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_method_response.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h, /home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_value.h,
/home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/fl_view.h, /home/jpnurmi/Temp/focus_traversal/linux/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_
[   +2 ms] [  +40 ms] executing: uname -m
[        ] [  +19 ms] Exit code 0 from: uname -m
[        ] [        ] x86_64
[        ] [   +3 ms] executing: [/home/jpnurmi/Flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [   +3 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [        ] 5fd1d36ecc6750302beebf73683d4a6977603abe
[        ] [        ] executing: [/home/jpnurmi/Flutter/] git tag --points-at 5fd1d36ecc6750302beebf73683d4a6977603abe
[        ] [   +9 ms] Exit code 0 from: git tag --points-at 5fd1d36ecc6750302beebf73683d4a6977603abe
[        ] [   +1 ms] executing: [/home/jpnurmi/Flutter/] git describe --match *.*.* --long --tags 5fd1d36ecc6750302beebf73683d4a6977603abe
[        ] [  +24 ms] Exit code 0 from: git describe --match *.*.* --long --tags 5fd1d36ecc6750302beebf73683d4a6977603abe
[        ] [        ] 2.6.0-11.0.pre-322-g5fd1d36ecc
[        ] [   +5 ms] executing: [/home/jpnurmi/Flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[        ] [   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] upstream/master
[        ] [        ] executing: [/home/jpnurmi/Flutter/] git ls-remote --get-url upstream
[        ] [   +2 ms] Exit code 0 from: git ls-remote --get-url upstream
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [  +30 ms] Unable to locate an Android SDK.
[        ] [   +4 ms] executing: [/home/jpnurmi/Flutter/] git rev-parse --abbrev-ref HEAD
[        ] [   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] master
[        ] [  +30 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [  +52 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[        ] [  +22 ms] Initializing file store
[        ] [  +11 ms] Skipping target: gen_localizations
[        ] [   +7 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
/home/jpnurmi/Temp/focus_traversal/.dart_tool/package_config_subset}
[        ] [   +2 ms] unpack_linux: Starting due to {}
[        ] [  +37 ms] unpack_linux: Complete
[        ] [ +388 ms] gen_dart_plugin_registrant: Complete
[        ] [        ] kernel_snapshot: Starting due to {}
[        ] [   +4 ms] /home/jpnurmi/Flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/jpnurmi/Flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot
--sdk-root /home/jpnurmi/Flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -DFLUTTER_WEB_AUTO_DETECT=true
-Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --packages /home/jpnurmi/Temp/focus_traversal/.dart_tool/package_config.json --output-dill
/home/jpnurmi/Temp/focus_traversal/.dart_tool/flutter_build/fb8397271c9bd03308e7a93600b16444/app.dill --depfile
/home/jpnurmi/Temp/focus_traversal/.dart_tool/flutter_build/fb8397271c9bd03308e7a93600b16444/kernel_snapshot.d package:focus_traversal/main.dart
[        ] [+6263 ms] kernel_snapshot: Complete
[        ] [ +276 ms] debug_bundle_linux-x64_assets: Starting due to {}
[        ] [  +92 ms] debug_bundle_linux-x64_assets: Complete
[        ] [ +371 ms] Persisting file store
[        ] [   +4 ms] Done persisting file store
[        ] [   +2 ms] build succeeded.
[        ] [   +4 ms] "flutter assemble" took 7,559ms.
[        ] [  +70 ms] ensureAnalyticsSent: 68ms
[        ] [   +2 ms] Running shutdown hooks
[        ] [        ] Shutdown hooks complete
[        ] [        ] exiting with code 0
[ +289 ms] [2/5] Building CXX object CMakeFiles/focus_traversal.dir/flutter/generated_plugin_registrant.cc.o
[  +12 ms] [3/5] Building CXX object CMakeFiles/focus_traversal.dir/my_application.cc.o
[ +110 ms] [4/5] Linking CXX executable intermediates_do_not_run/focus_traversal
[        ] [4/5] Install the project...
[   +4 ms] -- Install configuration: "Debug"
[   +6 ms] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/focus_traversal
[        ] -- Set runtime path of "/home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/focus_traversal" to "$ORIGIN/lib"
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/icudtl.dat
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/lib/libflutter_linux_gtk.so
[  +35 ms] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/version.json
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/packages
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/packages/cupertino_icons
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/NOTICES.Z
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/fonts
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/fonts/MaterialIcons-Regular.otf
[   +1 ms] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/kernel_blob.bin
[  +33 ms] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/FontManifest.json
[        ] -- Installing: /home/jpnurmi/Temp/focus_traversal/build/linux/x64/debug/bundle/data/flutter_assets/AssetManifest.json
[   +8 ms] Building Linux application... (completed in 8.7s)
[ +176 ms] Observatory URL on device: http://127.0.0.1:44987/Lx_z7X5gc9o=/
[   +5 ms] Caching compiled dill
[  +31 ms] Connecting to service protocol: http://127.0.0.1:44987/Lx_z7X5gc9o=/
[  +97 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:44987/Lx_z7X5gc9o=/.
[  +82 ms] DDS is listening at http://127.0.0.1:34847/yzrSqJwDzEg=/.
[  +47 ms] Successfully connected to service protocol: http://127.0.0.1:44987/Lx_z7X5gc9o=/
[  +29 ms] DevFS: Creating new filesystem on the device (null)
[  +13 ms] DevFS: Created new filesystem on the device (file:///tmp/focus_traversalRZYQHS/focus_traversal/)
[   +3 ms] Updating assets
[  +58 ms] Syncing files to device Linux...
[        ] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +1 ms] <- recompile package:focus_traversal/main.dart 7c20c58d-4a0e-4f23-8f01-5c441807523a
[        ] <- 7c20c58d-4a0e-4f23-8f01-5c441807523a
[        ] flutter: focus change: _ModalScopeState<dynamic> Focus Scope
[  +52 ms] Updating files.
[        ] DevFS: Sync finished
[        ] Syncing files to device Linux... (completed in 55ms)
[        ] Synced 0.0MB.
[   +1 ms] <- accept
[   +2 ms] Connected to _flutterView/0x2626cb0.
[   +1 ms] Flutter run key commands.
[        ] r Hot reload. 🔥🔥🔥
[        ] R Hot restart.
[        ] h List all available interactive commands.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] 💪 Running with sound null safety 💪
[        ] An Observatory debugger and profiler on Linux is available at: http://127.0.0.1:34847/yzrSqJwDzEg=/
[ +137 ms] The Flutter DevTools debugger and profiler on Linux is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:34847/yzrSqJwDzEg=/
[+4070 ms] flutter: focus change: ITEM 0
[+2218 ms] flutter: focus change: ITEM 19
[+1516 ms] flutter: focus change: ITEM 18
[ +456 ms] flutter: focus change: ITEM 17
[ +395 ms] flutter: focus change: ITEM 16
[ +437 ms] flutter: focus change: ITEM 15
[ +401 ms] flutter: focus change: ITEM 14
[ +474 ms] flutter: focus change: ITEM 13
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
Analyzing focus_traversal...                                            

   info • Avoid `print` calls in production code • lib/main.dart:20:7 • avoid_print

1 issue found. (ran in 1.0s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel master, 2.6.0-12.0.pre.322, on Ubuntu 21.10 5.13.0-16-generic, locale en_US.UTF-8)
    • Flutter version 2.6.0-12.0.pre.322 at /home/jpnurmi/Flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5fd1d36ecc (22 hours ago), 2021-10-13 10:44:55 +0100
    • Engine revision da5bd05854
    • Dart version 2.15.0 (build 2.15.0-208.0.dev)

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 13.0.0-2
    • cmake version 3.18.4
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] VS Code
    • VS Code at /snap/code/current
    • Flutter extension version 3.27.0

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Ubuntu 21.10 5.13.0-16-generic

! Doctor found issues in 2 categories.
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->

https://user-images.githubusercontent.com/140617/137275450-44b81904-1d1e-4d90-aed8-4f39e3c6cc3c.mp4