Repository: flutter
Issue: [Windows] Semantics `onDidLoseAccessibilityFocus` and `onDidGainAccessibilityFocus` are not called on focus change
Labels: framework,a: accessibility,platform-windows,a: desktop,has reproducible steps,P2,found in release: 2.10,found in release: 2.11,team-windows,triaged-windows

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
2. Press Tab until you have focused the counter text. You should see "Got focus." printed to your console.
3. Press Control + P. A new page should appear.

**Expected results:** <!-- what did you want to see? -->

I would have expected to see `Lost Focus` printed to the console as the `Semantics` instance lost focus.

**Actual results:** <!-- what did you see? -->

Nothing happens. When you click the "Back" button, you see the "Got focus." message printed to the console again.

<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
// ignore_for_file: avoid_print

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

/// An intent to push something.
class PushSomethingIntent extends Intent {
  /// Create an instance.
  const PushSomethingIntent();

  /// The hotkey to use.
  static const hotkey = SingleActivator(LogicalKeyboardKey.keyP, control: true);
}

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Shortcuts(
      child: Actions(
        actions: {
          PushSomethingIntent: CallbackAction<PushSomethingIntent>(
            onInvoke: (intent) => Navigator.of(context).push(
              MaterialPageRoute(
                builder: (context) => Scaffold(
                  appBar: AppBar(
                    title: const Text('Second Screen'),
                  ),
                  body: const Center(
                    child: Text('You can go back now.'),
                  ),
                ),
              ),
            ),
          )
        },
        child: Scaffold(
          appBar: AppBar(
            // Here we take the value from the MyHomePage object that was created by
            // the App.build method, and use it to set our appbar title.
            title: Text(widget.title),
          ),
          body: Center(
            // Center is a layout widget. It takes a single child and positions it
            // in the middle of the parent.
            child: Column(
              // Column is also a layout widget. It takes a list of children and
              // arranges them vertically. By default, it sizes itself to fit its
              // children horizontally, and tries to be as tall as its parent.
              //
              // Invoke "debug painting" (press "p" in the console, choose the
              // "Toggle Debug Paint" action from the Flutter Inspector in Android
              // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
              // to see the wireframe for each widget.
              //
              // Column has various properties to control how it sizes itself and
              // how it positions its children. Here we use mainAxisAlignment to
              // center the children vertically; the main axis here is the vertical
              // axis because Columns are vertical (the cross axis would be
              // horizontal).
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                const Text(
                  'You have pushed the button this many times:',
                ),
                Focus(
                  child: Semantics(
                    child: Text(
                      '$_counter',
                      style: Theme.of(context).textTheme.headline4,
                    ),
                    onDidGainAccessibilityFocus: () {
                      print('Got focus.');
                    },
                    onDidLoseAccessibilityFocus: () {
                      print('Lost focus.');
                    },
                  ),
                ),
              ],
            ),
          ),
          floatingActionButton: FloatingActionButton(
            onPressed: _incrementCounter,
            tooltip: 'Increment',
            child: const Icon(Icons.add),
          ), // This trailing comma makes auto-formatting nicer for build methods.
        ),
      ),
      shortcuts: const {PushSomethingIntent.hotkey: PushSomethingIntent()},
    );
  }
}
```

</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.
-->

```
[  +45 ms] executing: [C:\Users\chris\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +177 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] e85ba6eeae679e776792f8cacd10ebdd7707eecb
[        ] executing: [C:\Users\chris\flutter/] git tag --points-at e85ba6eeae679e776792f8cacd10ebdd7707eecb
[  +36 ms] Exit code 0 from: git tag --points-at e85ba6eeae679e776792f8cacd10ebdd7707eecb
[   +1 ms] executing: [C:\Users\chris\flutter/] git describe --match *.*.* --long --tags e85ba6eeae679e776792f8cacd10ebdd7707eecb
[  +40 ms] Exit code 0 from: git describe --match *.*.* --long --tags e85ba6eeae679e776792f8cacd10ebdd7707eecb
[        ] 2.10.0-0.0.pre-716-ge85ba6eeae
[   +5 ms] executing: [C:\Users\chris\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +25 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] executing: [C:\Users\chris\flutter/] git ls-remote --get-url origin
[  +22 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +75 ms] executing: [C:\Users\chris\flutter/] git rev-parse --abbrev-ref HEAD
[  +27 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[  +49 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.
[   +9 ms] Artifact Instance of 'PubDependencies' is not required, skipping update.
[   +7 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 '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.
[   +4 ms] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +40 ms] Skipping pub get: version match.
[  +85 ms] Generating C:\Users\chris\src\on_did_lose_accessibility_focus\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +69 ms] Initializing file store
[   +7 ms] Skipping target: gen_localizations
[   +4 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: C:\Users\chris\src\on_did_lose_accessibility_focus\.dart_tool\package_config_subset}
[  +17 ms] gen_dart_plugin_registrant: Complete
[   +1 ms] Skipping target: _composite
[   +1 ms] complete
[   +3 ms] Launching lib\main.dart on Windows in debug mode...
[   +3 ms] C:\Users\chris\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Users\chris\flutter\bin\cache\dart-sdk\bin\snapshots\frontend_server.dart.snapshot --sdk-root C:\Users\chris\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 C:\Users\chris\AppData\Local\Temp\flutter_tools.d33b92d0\flutter_tool.133b3b1d\app.dill --packages C:\Users\chris\src\on_did_lose_accessibility_focus\.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
[  +19 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
[  +26 ms] Exit code 0 from: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
[        ] [
             {
               "instanceId": "48f70a3c",
               "installDate": "2022-02-27T12:24:06Z",
               "installationName": "VisualStudio/17.1.0+32210.238",
               "installationPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise",
               "installationVersion": "17.1.32210.238",
               "productId": "Microsoft.VisualStudio.Product.Enterprise",
               "productPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\IDE\\devenv.exe",
               "state": 4294967295,
               "isComplete": true,
               "isLaunchable": true,
               "isPrerelease": false,
               "isRebootRequired": false,
               "displayName": "Visual Studio Enterprise 2022",
               "description": "Scalable, end-to-end solution for teams of any size",
               "channelId": "VisualStudio.17.Release",
               "channelUri": "https://aka.ms/vs/17/release/channel",
               "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
               "installedChannelUri": "https://aka.ms/vs/17/release/channel",
               "releaseNotes": "https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.1#17.1.0",
               "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=661288",
               "updateDate": "2022-02-27T12:24:06.5628333Z",
               "catalog": {
                 "buildBranch": "d17.1",
                 "buildVersion": "17.1.32210.238",
                 "id": "VisualStudio/17.1.0+32210.238",
                 "localBuild": "build-lab",
                 "manifestName": "VisualStudio",
                 "manifestType": "installer",
                 "productDisplayVersion": "17.1.0",
                 "productLine": "Dev17",
                 "productLineVersion": "2022",
                 "productMilestone": "RTW",
                 "productMilestoneIsPreRelease": "False",
                 "productName": "Visual Studio",
                 "productPatchVersion": "0",
                 "productPreReleaseMilestoneSuffix": "7.0",
                 "productSemanticVersion": "17.1.0+32210.238",
                 "requiredEngineVersion": "3.1.2196.8931"
               },
               "properties": {
                 "campaignId": "2030",
                 "channelManifestId": "VisualStudio.17.Release/17.1.0+32210.238",
                 "nickname": "2",
                 "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\setup.exe"
               }
             }
           ]
[   +1 ms] Building Windows application...
[  +13 ms] <- compile package:on_did_lose_accessibility_focus/main.dart
[   +1 ms] executing: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -S C:\Users\chris\src\on_did_lose_accessibility_focus\windows -B build\windows -G Visual Studio 17 2022
[  +41 ms] -- Configuring done
[ +168 ms] -- Generating done
[  +14 ms] -- Build files have been written to: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows
[  +22 ms] executing: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe --build build\windows --config Debug --target INSTALL --verbose
[  +94 ms] Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
[        ] Copyright (C) Microsoft Corporation. All rights reserved.
[  +49 ms] Build started 01/03/2022 15:12:57.
[ +154 ms] Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\INSTALL.vcxproj" on node 1 (default targets).
[        ] Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\INSTALL.vcxproj" (1) is building "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
[        ] InitializeBuildStatus:
[        ]   Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[  +14 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +18 ms] FinalizeBuildStatus:
[        ]   Deleting file "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
[        ]   Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
[        ] Done Building Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\ZERO_CHECK.vcxproj" (default targets).
[  +63 ms] Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\INSTALL.vcxproj" (1) is building "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\ALL_BUILD.vcxproj" (3) on node 1 (default targets).
[        ] Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\ALL_BUILD.vcxproj" (3) is building "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\flutter\flutter_wrapper_app.vcxproj" (4) on node 1 (default targets).
[        ] Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\flutter\flutter_wrapper_app.vcxproj" (4) is building "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\flutter\flutter_assemble.vcxproj" (5) on node 1 (default targets).
[        ] InitializeBuildStatus:
[        ]   Creating "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +6 ms] CustomBuild:
[        ]   "The build of 'C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\CMakeFiles\929510fb3ccdad1caece5fb29dd3c570\flutter_assemble.rule' depends on 'C:\USERS\CHRIS\SRC\ON_DID_LOSE_ACCESSIBILITY_FOCUS\WINDOWS\FLUTTER\EPHEMERAL\FLUTTER_WINDOWS.DLL' which is produced by the build of 'C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\CMakeFiles\26fdd4173e01b3324d06d656e9fd6e3d\flutter_windows.dll.rule'. The items cannot be built in parallel."
[  +58 ms]   Generating C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/flutter_windows.dll, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/flutter_export.h, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/flutter_windows.h, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/flutter_messenger.h, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/flutter_plugin_registrar.h, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/flutter_texture_registrar.h, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/cpp_client_wrapper/core_implementations.cc, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/cpp_client_wrapper/standard_codec.cc, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/cpp_client_wrapper/plugin_registrar.cc, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/cpp_client_wrapper/flutter_engine.cc, C:/Users/chris/src/on_did_lose_accessibility_focus/windows/flutter/ephemeral/cpp_client_wrapper/flutter_view_controller.cc, _phony_
[ +742 ms]   [  +46 ms] executing: [C:\Users\chris\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +169 ms]   [ +183 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ]   [        ] e85ba6eeae679e776792f8cacd10ebdd7707eecb
[        ]   [        ] executing: [C:\Users\chris\flutter/] git tag --points-at e85ba6eeae679e776792f8cacd10ebdd7707eecb
[  +43 ms]   [  +43 ms] Exit code 0 from: git tag --points-at e85ba6eeae679e776792f8cacd10ebdd7707eecb
[        ]   [        ] executing: [C:\Users\chris\flutter/] git describe --match *.*.* --long --tags e85ba6eeae679e776792f8cacd10ebdd7707eecb
[  +45 ms]   [  +45 ms] Exit code 0 from: git describe --match *.*.* --long --tags e85ba6eeae679e776792f8cacd10ebdd7707eecb
[        ]   [        ] 2.10.0-0.0.pre-716-ge85ba6eeae
[   +5 ms]   [   +5 ms] executing: [C:\Users\chris\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +31 ms]   [  +31 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ]   [        ] origin/master
[        ]   [        ] executing: [C:\Users\chris\flutter/] git ls-remote --get-url origin
[  +27 ms]   [  +27 ms] Exit code 0 from: git ls-remote --get-url origin
[        ]   [        ] https://github.com/flutter/flutter.git
[  +39 ms]   [  +39 ms] executing: [C:\Users\chris\flutter/] git rev-parse --abbrev-ref HEAD
[  +33 ms]   [  +33 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ]   [        ] master
[  +39 ms]   [  +39 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.
[   +1 ms]   [   +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.
[  +10 ms]   [  +10 ms] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +34 ms]   [  +34 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.
[   +1 ms]   [   +1 ms] 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.
[        ]   [        ] 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.
[  +27 ms]   [  +27 ms] Initializing file store
[  +10 ms]   [  +10 ms] Done initializing file store
[  +28 ms]   [  +28 ms] Skipping target: gen_localizations
[   +7 ms]   [   +7 ms] Skipping target: gen_dart_plugin_registrant
[+1687 ms]   [+1687 ms] Skipping target: unpack_windows
[ +313 ms]   [ +313 ms] kernel_snapshot: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: C:\Users\chris\src\on_did_lose_accessibility_focus\lib\main.dart}
[  +15 ms]   [  +15 ms] C:\Users\chris\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Users\chris\flutter\bin\cache\dart-sdk\bin\snapshots\frontend_server.dart.snapshot --sdk-root C:\Users\chris\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 C:\Users\chris\src\on_did_lose_accessibility_focus\.dart_tool\package_config.json --output-dill C:\Users\chris\src\on_did_lose_accessibility_focus\.dart_tool\flutter_build\4079dae88039f4e9d3de72d88967c827\app.dill --depfile C:\Users\chris\src\on_did_lose_accessibility_focus\.dart_tool\flutter_build\4079dae88039f4e9d3de72d88967c827\kernel_snapshot.d package:on_did_lose_accessibility_focus/main.dart
[+5698 ms]   [+5698 ms] kernel_snapshot: Complete
[ +326 ms]   [ +326 ms] debug_bundle_windows_assets: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: C:\Users\chris\src\on_did_lose_accessibility_focus\.dart_tool\flutter_build\4079dae88039f4e9d3de72d88967c827\app.dill}
[ +119 ms]   [ +119 ms] debug_bundle_windows_assets: Complete
[ +156 ms]   [ +156 ms] Persisting file store
[   +6 ms]   [   +6 ms] Done persisting file store
[   +2 ms]   [   +3 ms] build succeeded.
[   +6 ms]   [   +6 ms] "flutter assemble" took 8,469ms.
[   +8 ms]   [   +8 ms] ensureAnalyticsSent: 5ms
[        ]   [        ] Running shutdown hooks
[        ]   [        ] Shutdown hooks complete
[        ]   [        ] exiting with code 0
[  +50 ms] FinalizeBuildStatus:
[        ]   Deleting file "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild".
[        ]   Touching "x64\Debug\flutter_assemble\flutter_assemble.tlog\flutter_assemble.lastbuildstate".
[        ] Done Building Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\flutter\flutter_assemble.vcxproj" (default targets).
[   +3 ms] InitializeBuildStatus:
[        ]   Creating "flutter_wrapper_app.dir\Debug\flutter_.29A3F7AE.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +38 ms] ClCompile:
[        ]   All outputs are up-to-date.
[  +14 ms] Lib:
[        ]   All outputs are up-to-date.
[        ]   flutter_wrapper_app.vcxproj -> C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\flutter\Debug\flutter_wrapper_app.lib
[   +6 ms] FinalizeBuildStatus:
[        ]   Deleting file "flutter_wrapper_app.dir\Debug\flutter_.29A3F7AE.tlog\unsuccessfulbuild".
[        ]   Touching "flutter_wrapper_app.dir\Debug\flutter_.29A3F7AE.tlog\flutter_wrapper_app.lastbuildstate".
[        ] Done Building Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\flutter\flutter_wrapper_app.vcxproj" (default targets).
[  +18 ms] Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\ALL_BUILD.vcxproj" (3) is building "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\flutter\flutter_wrapper_plugin.vcxproj" (6) on node 1 (default targets).
[        ] InitializeBuildStatus:
[        ]   Creating "flutter_wrapper_plugin.dir\Debug\flutter_.CB3943D9.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[   +4 ms] ClCompile:
[        ]   All outputs are up-to-date.
[   +2 ms] Lib:
[        ]   All outputs are up-to-date.
[        ]   flutter_wrapper_plugin.vcxproj -> C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\flutter\Debug\flutter_wrapper_plugin.lib
[   +3 ms] FinalizeBuildStatus:
[        ]   Deleting file "flutter_wrapper_plugin.dir\Debug\flutter_.CB3943D9.tlog\unsuccessfulbuild".
[        ]   Touching "flutter_wrapper_plugin.dir\Debug\flutter_.CB3943D9.tlog\flutter_wrapper_plugin.lastbuildstate".
[        ] Done Building Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\flutter\flutter_wrapper_plugin.vcxproj" (default targets).
[  +19 ms] Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\ALL_BUILD.vcxproj" (3) is building "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\runner\on_did_lose_accessibility_focus.vcxproj" (7) on node 1 (default targets).
[        ] InitializeBuildStatus:
[        ]   Creating "on_did_lose_accessibility_focus.dir\Debug\on_did_l.0987234E.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +14 ms] ClCompile:
[        ]   C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c /IC:\Users\chris\src\on_did_lose_accessibility_focus\windows /IC:\Users\chris\src\on_did_lose_accessibility_focus\windows\flutter\ephemeral /IC:\Users\chris\src\on_did_lose_accessibility_focus\windows\flutter\ephemeral\cpp_client_wrapper\include /Zi /nologo /W4 /WX /diagnostics:column /Od /Ob0 /D _UNICODE /D UNICODE /D WIN32 /D _WINDOWS /D _HAS_EXCEPTIONS=0 /D _DEBUG /D NOMINMAX /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++17 /Fo"on_did_lose_accessibility_focus.dir\Debug\\" /Fd"on_did_lose_accessibility_focus.dir\Debug\vc143.pdb" /external:W4 /Gd /TP /wd4100 /errorReport:queue C:\Users\chris\src\on_did_lose_accessibility_focus\windows\flutter\generated_plugin_registrant.cc C:\Users\chris\src\on_did_lose_accessibility_focus\windows\runner\flutter_window.cpp
[  +27 ms]   generated_plugin_registrant.cc
[ +247 ms]   flutter_window.cpp
[ +462 ms]   Generating Code...
[  +50 ms] ResourceCompile:
[        ]   All outputs are up-to-date.
[  +19 ms] Link:
[        ]   C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\runner\Debug\on_did_lose_accessibility_focus.exe" /INCREMENTAL /ILK:"on_did_lose_accessibility_focus.dir\Debug\on_did_lose_accessibility_focus.ilk" /NOLOGO ..\flutter\Debug\flutter_wrapper_app.lib C:\Users\chris\src\on_did_lose_accessibility_focus\windows\flutter\ephemeral\flutter_windows.dll.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /manifestinput:C:\Users\chris\src\on_did_lose_accessibility_focus\windows\runner\runner.exe.manifest /DEBUG /PDB:"C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/on_did_lose_accessibility_focus.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/on_did_lose_accessibility_focus.lib" /MACHINE:X64  /machine:x64 on_did_lose_accessibility_focus.dir\Debug\Runner.res
[        ]   on_did_lose_accessibility_focus.dir\Debug\flutter_window.obj
[        ]   on_did_lose_accessibility_focus.dir\Debug\main.obj
[        ]   on_did_lose_accessibility_focus.dir\Debug\utils.obj
[        ]   on_did_lose_accessibility_focus.dir\Debug\win32_window.obj
[        ]   on_did_lose_accessibility_focus.dir\Debug\generated_plugin_registrant.obj
[ +119 ms]   on_did_lose_accessibility_focus.vcxproj -> C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\runner\Debug\on_did_lose_accessibility_focus.exe
[   +6 ms] FinalizeBuildStatus:
[        ]   Deleting file "on_did_lose_accessibility_focus.dir\Debug\on_did_l.0987234E.tlog\unsuccessfulbuild".
[        ]   Touching "on_did_lose_accessibility_focus.dir\Debug\on_did_l.0987234E.tlog\on_did_lose_accessibility_focus.lastbuildstate".
[        ] Done Building Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\runner\on_did_lose_accessibility_focus.vcxproj" (default targets).
[   +4 ms] InitializeBuildStatus:
[        ]   Creating "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[   +5 ms] FinalizeBuildStatus:
[        ]   Deleting file "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild".
[        ]   Touching "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate".
[        ] Done Building Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\ALL_BUILD.vcxproj" (default targets).
[   +3 ms] InitializeBuildStatus:
[        ]   Creating "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[  +32 ms] PostBuildEvent:
[        ]   setlocal
[        ]   "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
[        ]   if %errorlevel% neq 0 goto :cmEnd
[        ]   :cmEnd
[        ]   endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
[        ]   :cmErrorLevel
[        ]   exit /b %1
[        ]   :cmDone
[        ]   if %errorlevel% neq 0 goto :VCEnd
[        ]   :VCEnd
[  +29 ms]   -- Install configuration: "Debug"
[  +14 ms]   -- Up-to-date: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/icudtl.dat
[        ]   -- Up-to-date: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/flutter_windows.dll
[   +4 ms]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets
[        ]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/AssetManifest.json
[        ]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/FontManifest.json
[        ]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/fonts
[        ]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/fonts/MaterialIcons-Regular.otf
[   +3 ms]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/kernel_blob.bin
[  +86 ms]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/NOTICES.Z
[        ]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/packages
[        ]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons
[        ]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets
[        ]   -- Installing: C:/Users/chris/src/on_did_lose_accessibility_focus/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
[   +9 ms] FinalizeBuildStatus:
[        ]   Deleting file "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild".
[        ]   Touching "x64\Debug\INSTALL\INSTALL.tlog\INSTALL.lastbuildstate".
[        ] Done Building Project "C:\Users\chris\src\on_did_lose_accessibility_focus\build\windows\INSTALL.vcxproj" (default targets).
[   +1 ms] Build succeeded.
[        ]     0 Warning(s)
[        ]     0 Error(s)
[        ] Time Elapsed 00:00:11.28
[  +16 ms] Building Windows application... (completed in 11.7s)
[ +195 ms] Observatory URL on device: http://127.0.0.1:1030/mnFpFeoutFQ=/
[   +4 ms] Caching compiled dill
[  +19 ms] Connecting to service protocol: http://127.0.0.1:1030/mnFpFeoutFQ=/
[  +94 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:1030/mnFpFeoutFQ=/.
[  +45 ms] DDS is listening at http://127.0.0.1:1034/_6fKjdlUpTY=/.
[  +31 ms] Successfully connected to service protocol: http://127.0.0.1:1030/mnFpFeoutFQ=/
[  +12 ms] DevFS: Creating new filesystem on the device (null)
[  +12 ms] DevFS: Created new filesystem on the device (file:///C:/Users/chris/AppData/Local/Temp/on_did_lose_accessibility_focuse680fe5e/on_did_lose_accessibility_focus/)
[   +1 ms] Updating assets
[  +53 ms] Syncing files to device Windows...
[   +1 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] Processing bundle.
[        ] <- recompile package:on_did_lose_accessibility_focus/main.dart 056b8efa-f0c8-4a04-9dac-af25f23f1095
[        ] <- 056b8efa-f0c8-4a04-9dac-af25f23f1095
[   +1 ms] Bundle processing done.
[  +49 ms] Updating files.
[        ] DevFS: Sync finished
[        ] Syncing files to device Windows... (completed in 53ms)
[        ] Synced 0.0MB.
[   +1 ms] <- accept
[        ] Connected to _flutterView/0x1ac547ccdc0.
[   +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 Windows is available at: http://127.0.0.1:1034/_6fKjdlUpTY=/
[ +113 ms] The Flutter DevTools debugger and profiler on Windows is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:1034/_6fKjdlUpTY=/
[+1149 ms] flutter: Got focus.
[+3412 ms] flutter: Got focus.
[+1869 ms] DevFS: Deleting filesystem on the device (file:///C:/Users/chris/AppData/Local/Temp/on_did_lose_accessibility_focuse680fe5e/on_did_lose_accessibility_focus/)
[   +2 ms] DevFS: Deleted filesystem on the device (file:///C:/Users/chris/AppData/Local/Temp/on_did_lose_accessibility_focuse680fe5e/on_did_lose_accessibility_focus/)
[   +5 ms] Application finished.
[   +4 ms] "flutter run" took 19,126ms.
[   +9 ms] Service protocol connection closed.
[   +1 ms] ensureAnalyticsSent: 8ms
[        ] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[ÔêÜ] Flutter (Channel master, 2.11.0-0.0.pre.716, on Microsoft Windows [Version 10.0.22000.527], locale en-GB)
    ÔÇó Flutter version 2.11.0-0.0.pre.716 at C:\Users\chris\flutter
    ÔÇó Upstream repository https://github.com/flutter/flutter.git
    ÔÇó Framework revision e85ba6eeae (8 hours ago), 2022-02-28 23:31:20 -0800
    ÔÇó Engine revision 615a60512c
    ÔÇó Dart version 2.17.0 (build 2.17.0-150.0.dev)
    ÔÇó DevTools version 2.11.1

[ÔêÜ] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc2)
    ÔÇó Android SDK at C:\Users\chris\AppData\Local\Android\sdk
    ÔÇó Platform android-31, build-tools 31.0.0-rc2
    ÔÇó Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    ÔÇó Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    ÔÇó All Android licenses accepted.

[ÔêÜ] Chrome - develop for the web
    ÔÇó Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[ÔêÜ] Visual Studio - develop for Windows (Visual Studio Enterprise 2022 17.1.0)
    ÔÇó Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Enterprise
    ÔÇó Visual Studio Enterprise 2022 version 17.1.32210.238
    ÔÇó Windows 10 SDK version 10.0.22000.0

[ÔêÜ] Android Studio (version 2020.3)
    ÔÇó Android Studio at C:\Program Files\Android\Android Studio
    ÔÇó Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    ÔÇó Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    ÔÇó Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[ÔêÜ] VS Code, 64-bit edition (version 1.64.2)
    ÔÇó VS Code at C:\Program Files\Microsoft VS Code
    ÔÇó Flutter extension version 3.27.0

[ÔêÜ] Connected device (3 available)
    ÔÇó Windows (desktop) ÔÇó windows ÔÇó windows-x64    ÔÇó Microsoft Windows [Version 10.0.22000.527]
    ÔÇó Chrome (web)      ÔÇó chrome  ÔÇó web-javascript ÔÇó Google Chrome 98.0.4758.102
    ÔÇó Edge (web)        ÔÇó edge    ÔÇó web-javascript ÔÇó Microsoft Edge 98.0.1108.56

[ÔêÜ] HTTP Host Availability
    ÔÇó All required HTTP hosts are available

ÔÇó No issues found!
```

</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.
-->