Repository: flutter
Issue: Capslock/ctrl stuck after pressing shift and touching trackpad on Microsoft Surface Laptop
Labels: a: text input,framework,platform-windows,a: desktop,a: error message,P2,team-windows,triaged-windows

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->
Example 1:

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
2. Press right-shift key and touch the trackpad
3. Release the key.
4. Enter "some text" in the text field.

Example 2:

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
2. Press right-shift key and touch the trackpad
3. Release the key.
4. Press left-shift key and touch the trackpad
5. Exit the app

**Expected results:** _nothing special should happen_

**Actual results:** The ctrl key seems to be locked system wide. Rebooting is needed to restore.

<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 MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Capslock"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            TextField(),
          ],
        ),
      ),
    );
  }
}

```

</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.
-->

### example 1

```
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\it> cd .\caps_bug\
PS C:\Users\it\caps_bug> flutter run --verbose
[  +83 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +309 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +2 ms] 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c
[        ] executing: [C:\flutter/] git tag --points-at 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c
[ +271 ms] Exit code 0 from: git tag --points-at 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c
[        ] 2.10.0
[  +10 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +50 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [C:\flutter/] git ls-remote --get-url origin
[  +48 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[ +145 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
[  +99 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[   +1 ms] stable
[ +101 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.
[   +8 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.
[ +166 ms] executing: C:\Users\it\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[+2218 ms] List of devices attached


                    * daemon not running; starting now at tcp:5037
                    * daemon started successfully
[   +6 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.
[   +6 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.
[  +81 ms] Multiple devices found:
[  +25 ms] Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.556]
[        ] Chrome (web)      • chrome  • web-javascript • Google Chrome 99.0.4844.84
[        ] Edge (web)        • edge    • web-javascript • Microsoft Edge 99.0.1150.55
[        ] [1]: Windows (windows)
[        ] [2]: Chrome (chrome)
[        ] [3]: Edge (edge)
[   +1 ms] Please choose one (To quit, press "q/Q")
[        ] :
[+2191 ms] 1
[  +78 ms] Skipping pub get: version match.
[ +154 ms] Generating C:\Users\it\caps_bug\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +117 ms] Initializing file store
[  +16 ms] Skipping target: gen_localizations
[   +5 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have
updated contents: C:\Users\it\caps_bug\.dart_tool\package_config_subset}
[  +23 ms] gen_dart_plugin_registrant: Complete
[   +2 ms] Skipping target: _composite
[   +2 ms] complete
[   +7 ms] Launching lib\main.dart on Windows in debug mode...
[   +7 ms] C:\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\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\it\AppData\Local\Temp\flutter_tools.269bd232\flutter_tool.307435bb\app.dill --packages
C:\Users\it\caps_bug\.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 --enable-experiment=alternative-invalidation-strategy
[  +33 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
[  +35 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
[        ] []
[        ] executing: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products *
-utf8 -latest -version 16 -requires Microsoft.VisualStudio.Workload.VCTools
Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
[  +19 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.VCTools
Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
[        ] [
             {
               "instanceId": "941f62dd",
               "installDate": "2021-11-08T09:14:09Z",
               "installationName": "VisualStudio/16.11.5+31729.503",
               "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools",
               "installationVersion": "16.11.31729.503",
               "productId": "Microsoft.VisualStudio.Product.BuildTools",
               "productPath": "C:\\Program Files (x86)\\Microsoft Visual
               Studio\\2019\\BuildTools\\Common7\\Tools\\LaunchDevCmd.bat",
               "state": 4294967295,
               "isComplete": true,
               "isLaunchable": true,
               "isPrerelease": false,
               "isRebootRequired": false,
               "displayName": "Visual Studio Build Tools 2019",
               "description": "The Visual Studio Build Tools allows you to build native and managed MSBuild-based
               applications without requiring the Visual Studio IDE. There are options to install the Visual C++
               compilers and libraries, MFC, ATL, and C++/CLI support.",
               "channelId": "VisualStudio.16.Release",
               "channelUri": "https://aka.ms/vs/16/release/channel",
               "enginePath": "C:\\Program Files (x86)\\Microsoft Visual
               Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
               "releaseNotes":
               "https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-v16.11#16.11.5",
               "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660909",
               "updateDate": "2021-11-08T09:14:09.951093Z",
               "catalog": {
                 "buildBranch": "d16.11",
                 "buildVersion": "16.11.31729.503",
                 "id": "VisualStudio/16.11.5+31729.503",
                 "localBuild": "build-lab",
                 "manifestName": "VisualStudio",
                 "manifestType": "installer",
                 "productDisplayVersion": "16.11.5",
                 "productLine": "Dev16",
                 "productLineVersion": "2019",
                 "productMilestone": "RTW",
                 "productMilestoneIsPreRelease": "False",
                 "productName": "Visual Studio",
                 "productPatchVersion": "5",
                 "productPreReleaseMilestoneSuffix": "1.0",
                 "productSemanticVersion": "16.11.5+31729.503",
                 "requiredEngineVersion": "2.11.40.25675"
               },
               "properties": {
                 "campaignId": "",
                 "channelManifestId": "VisualStudio.16.Release/16.11.5+31729.503",
                 "nickname": "",
                 "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\setup.exe"
               }
             }
           ]
[   +2 ms] Building Windows application...
[  +12 ms] <- compile package:caps_bug/main.dart
[   +1 ms] executing: C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -S C:\Users\it\caps_bug\windows
-B build\windows -G Visual Studio 16 2019
[ +109 ms] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
[ +107 ms] -- Configuring done
[ +274 ms] -- Generating done
[  +22 ms] -- Build files have been written to: C:/Users/it/caps_bug/build/windows
[   +6 ms] executing: C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe --build build\windows --config
Debug --target INSTALL --verbose
[ +176 ms] Microsoft (R) Build Engine version 16.11.1+3e40a09f8 for .NET Framework
[   +1 ms] Copyright (C) Microsoft Corporation. All rights reserved.
[  +55 ms] Build started 4/4/2022 12:27:19 PM.
[ +292 ms] Project "C:\Users\it\caps_bug\build\windows\INSTALL.vcxproj" on node 1 (default targets).
[        ] Project "C:\Users\it\caps_bug\build\windows\INSTALL.vcxproj" (1) is building
"C:\Users\it\caps_bug\build\windows\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
[   +1 ms] InitializeBuildStatus:
[   +2 ms]   Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[  +23 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +48 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\it\caps_bug\build\windows\ZERO_CHECK.vcxproj" (default targets).
[  +97 ms] Project "C:\Users\it\caps_bug\build\windows\INSTALL.vcxproj" (1) is building
"C:\Users\it\caps_bug\build\windows\ALL_BUILD.vcxproj" (3) on node 1 (default targets).
[   +1 ms] Project "C:\Users\it\caps_bug\build\windows\ALL_BUILD.vcxproj" (3) is building
"C:\Users\it\caps_bug\build\windows\runner\caps_bug.vcxproj" (4) on node 1 (default targets).
[   +1 ms] Project "C:\Users\it\caps_bug\build\windows\runner\caps_bug.vcxproj" (4) is building
"C:\Users\it\caps_bug\build\windows\flutter\flutter_assemble.vcxproj" (5) on node 1 (default targets).
[        ] InitializeBuildStatus:
[   +1 ms]   Creating "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild" because "AlwaysCreate" was
specified.
[   +3 ms] CustomBuild:
[        ]   "The build of
'C:\Users\it\caps_bug\build\windows\CMakeFiles\bbc10212215e593a1de703293f5b2b51\flutter_assemble.rule' depends on
'C:\USERS\IT\CAPS_BUG\WINDOWS\FLUTTER\EPHEMERAL\FLUTTER_WINDOWS.DLL' which is produced by the build of
'C:\Users\it\caps_bug\build\windows\CMakeFiles\4529cd4e700183ab612a6d17aa6694af\flutter_windows.dll.rule'. The items
cannot be built in parallel."
[  +78 ms]   Generating C:/Users/it/caps_bug/windows/flutter/ephemeral/flutter_windows.dll,
C:/Users/it/caps_bug/windows/flutter/ephemeral/flutter_export.h,
C:/Users/it/caps_bug/windows/flutter/ephemeral/flutter_windows.h,
C:/Users/it/caps_bug/windows/flutter/ephemeral/flutter_messenger.h,
C:/Users/it/caps_bug/windows/flutter/ephemeral/flutter_plugin_registrar.h,
C:/Users/it/caps_bug/windows/flutter/ephemeral/flutter_texture_registrar.h,
C:/Users/it/caps_bug/windows/flutter/ephemeral/cpp_client_wrapper/core_implementations.cc,
C:/Users/it/caps_bug/windows/flutter/ephemeral/cpp_client_wrapper/standard_codec.cc,
C:/Users/it/caps_bug/windows/flutter/ephemeral/cpp_client_wrapper/plugin_registrar.cc,
C:/Users/it/caps_bug/windows/flutter/ephemeral/cpp_client_wrapper/flutter_engine.cc,
C:/Users/it/caps_bug/windows/flutter/ephemeral/cpp_client_wrapper/flutter_view_controller.cc, _phony_
[+1196 ms]   [  +74 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +292 ms]   [ +314 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ]   [        ] 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c
[        ]   [        ] executing: [C:\flutter/] git tag --points-at 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c
[  +63 ms]   [  +64 ms] Exit code 0 from: git tag --points-at 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c
[        ]   [        ] 2.10.0
[   +7 ms]   [   +7 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +47 ms]   [  +47 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ]   [        ] origin/stable
[        ]   [        ] executing: [C:\flutter/] git ls-remote --get-url origin
[  +45 ms]   [  +46 ms] Exit code 0 from: git ls-remote --get-url origin
[        ]   [        ] https://github.com/flutter/flutter.git
[  +53 ms]   [  +52 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
[  +48 ms]   [  +49 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ]   [        ] stable
[  +59 ms]   [  +59 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]   [   +3 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.
[  +81 ms]   [  +82 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]   [   +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.
[   +1 ms]   [        ] 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.
[  +87 ms]   [  +92 ms] Initializing file store
[  +20 ms]   [  +20 ms] Done initializing file store
[  +68 ms]   [  +68 ms] Skipping target: gen_localizations
[  +13 ms]   [  +13 ms] Skipping target: gen_dart_plugin_registrant
[+3789 ms]   [+3789 ms] Skipping target: unpack_windows
[ +488 ms]   [ +488 ms] Skipping target: kernel_snapshot
[ +385 ms]   [ +386 ms] Skipping target: debug_bundle_windows_assets
[        ]   [        ] Persisting file store
[   +9 ms]   [   +9 ms] Done persisting file store
[  +10 ms]   [  +10 ms] build succeeded.
[  +10 ms]   [  +10 ms] "flutter assemble" took 4,986ms.
[ +137 ms]   [ +137 ms] ensureAnalyticsSent: 133ms
[   +1 ms]   [   +1 ms] Running shutdown hooks
[        ]   [        ] Shutdown hooks complete
[        ]   [        ] exiting with code 0
[  +58 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\it\caps_bug\build\windows\flutter\flutter_assemble.vcxproj" (default
targets).
[  +32 ms] Project "C:\Users\it\caps_bug\build\windows\runner\caps_bug.vcxproj" (4) is building
"C:\Users\it\caps_bug\build\windows\flutter\flutter_wrapper_app.vcxproj" (6) on node 1 (default targets).
[        ] InitializeBuildStatus:
[        ]   Creating "flutter_wrapper_app.dir\Debug\flutter_.788EABD2.tlog\unsuccessfulbuild" because "AlwaysCreate"
was specified.
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +46 ms] ClCompile:
[        ]   All outputs are up-to-date.
[  +21 ms] Lib:
[        ]   All outputs are up-to-date.
[        ]   flutter_wrapper_app.vcxproj -> C:\Users\it\caps_bug\build\windows\flutter\Debug\flutter_wrapper_app.lib
[   +9 ms] FinalizeBuildStatus:
[        ]   Deleting file "flutter_wrapper_app.dir\Debug\flutter_.788EABD2.tlog\unsuccessfulbuild".
[        ]   Touching "flutter_wrapper_app.dir\Debug\flutter_.788EABD2.tlog\flutter_wrapper_app.lastbuildstate".
[        ] Done Building Project "C:\Users\it\caps_bug\build\windows\flutter\flutter_wrapper_app.vcxproj" (default
targets).
[   +7 ms] InitializeBuildStatus:
[        ]   Creating "caps_bug.dir\Debug\caps_bug.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +32 ms] ClCompile:
[        ]   C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\CL.exe /c /IC:\Users\it\caps_bug\windows
/IC:\Users\it\caps_bug\windows\flutter\ephemeral
/IC:\Users\it\caps_bug\windows\flutter\ephemeral\cpp_client_wrapper\include /Zi /nologo /W4 /WX /diagnostics:column /Od
/Ob0 /D WIN32 /D _WINDOWS /D _HAS_EXCEPTIONS=0 /D _DEBUG /D NOMINMAX /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\""
/D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++17
/Fo"caps_bug.dir\Debug\\" /Fd"caps_bug.dir\Debug\vc142.pdb" /external:W4 /Gd /TP /wd4100 /errorReport:queue
C:\Users\it\caps_bug\windows\flutter\generated_plugin_registrant.cc
C:\Users\it\caps_bug\windows\runner\flutter_window.cpp
[ +171 ms]   generated_plugin_registrant.cc
[ +521 ms]   flutter_window.cpp
[ +778 ms]   Generating Code...
[  +68 ms] ResourceCompile:
[        ]   All outputs are up-to-date.
[  +39 ms] Link:
[        ]   C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE
/OUT:"C:\Users\it\caps_bug\build\windows\runner\Debug\caps_bug.exe" /INCREMENTAL /ILK:"caps_bug.dir\Debug\caps_bug.ilk"
/NOLOGO ..\flutter\Debug\flutter_wrapper_app.lib C:\Users\it\caps_bug\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\it\caps_bug\windows\runner\runner.exe.manifest /DEBUG
/PDB:"C:/Users/it/caps_bug/build/windows/runner/Debug/caps_bug.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:/Users/it/caps_bug/build/windows/runner/Debug/caps_bug.lib" /MACHINE:X64  /machine:x64
caps_bug.dir\Debug\Runner.res
[   +1 ms]   caps_bug.dir\Debug\flutter_window.obj
[        ]   caps_bug.dir\Debug\main.obj
[        ]   caps_bug.dir\Debug\utils.obj
[        ]   caps_bug.dir\Debug\win32_window.obj
[        ]   caps_bug.dir\Debug\generated_plugin_registrant.obj
[ +476 ms]   caps_bug.vcxproj -> C:\Users\it\caps_bug\build\windows\runner\Debug\caps_bug.exe
[   +6 ms] FinalizeBuildStatus:
[        ]   Deleting file "caps_bug.dir\Debug\caps_bug.tlog\unsuccessfulbuild".
[        ]   Touching "caps_bug.dir\Debug\caps_bug.tlog\caps_bug.lastbuildstate".
[        ] Done Building Project "C:\Users\it\caps_bug\build\windows\runner\caps_bug.vcxproj" (default targets).
[  +31 ms] Project "C:\Users\it\caps_bug\build\windows\ALL_BUILD.vcxproj" (3) is building
"C:\Users\it\caps_bug\build\windows\flutter\flutter_wrapper_plugin.vcxproj" (7) on node 1 (default targets).
[        ] InitializeBuildStatus:
[        ]   Creating "flutter_wrapper_plugin.dir\Debug\flutter_.1EA01A03.tlog\unsuccessfulbuild" because "AlwaysCreate"
was specified.
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[   +9 ms] ClCompile:
[        ]   All outputs are up-to-date.
[   +3 ms] Lib:
[        ]   All outputs are up-to-date.
[        ]   flutter_wrapper_plugin.vcxproj ->
C:\Users\it\caps_bug\build\windows\flutter\Debug\flutter_wrapper_plugin.lib
[   +4 ms] FinalizeBuildStatus:
[        ]   Deleting file "flutter_wrapper_plugin.dir\Debug\flutter_.1EA01A03.tlog\unsuccessfulbuild".
[        ]   Touching "flutter_wrapper_plugin.dir\Debug\flutter_.1EA01A03.tlog\flutter_wrapper_plugin.lastbuildstate".
[        ] Done Building Project "C:\Users\it\caps_bug\build\windows\flutter\flutter_wrapper_plugin.vcxproj" (default
targets).
[   +6 ms] InitializeBuildStatus:
[        ]   Creating "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +2 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +12 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\it\caps_bug\build\windows\ALL_BUILD.vcxproj" (default targets).
[   +5 ms] InitializeBuildStatus:
[        ]   Creating "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[  +46 ms] PostBuildEvent:
[        ]   setlocal
[        ]   "C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\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
[  +42 ms]   -- Install configuration: "Debug"
[  +12 ms]   -- Up-to-date: C:/Users/it/caps_bug/build/windows/runner/Debug/data/icudtl.dat
[ +143 ms]   -- Up-to-date: C:/Users/it/caps_bug/build/windows/runner/Debug/flutter_windows.dll
[   +5 ms]   -- Installing: C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets
[        ]   -- Installing: C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/AssetManifest.json
[   +1 ms]   -- Installing: C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/FontManifest.json
[        ]   -- Installing: C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/fonts
[        ]   -- Installing:
C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/fonts/MaterialIcons-Regular.otf
[   +3 ms]   -- Installing: C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/kernel_blob.bin
[  +76 ms]   -- Installing: C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/NOTICES.Z
[   +1 ms]   -- Installing: C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/packages
[        ]   -- Installing: C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons
[        ]   -- Installing:
C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets
[        ]   -- Installing:
C:/Users/it/caps_bug/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
[  +13 ms] FinalizeBuildStatus:
[        ]   Deleting file "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild".
[        ]   Touching "x64\Debug\INSTALL\INSTALL.tlog\INSTALL.lastbuildstate".
[        ] Done Building Project "C:\Users\it\caps_bug\build\windows\INSTALL.vcxproj" (default targets).
[        ] Build succeeded.
[        ]     0 Warning(s)
[        ]     0 Error(s)
[        ] Time Elapsed 00:00:10.21
[  +18 ms] Building Windows application... (completed in 11.0s)
[ +262 ms] Observatory URL on device: http://127.0.0.1:50064/gUjAAG9FpeY=/
[   +4 ms] Caching compiled dill
[  +23 ms] Connecting to service protocol: http://127.0.0.1:50064/gUjAAG9FpeY=/
[ +105 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:50064/gUjAAG9FpeY=/.
[  +63 ms] DDS is listening at http://127.0.0.1:50068/xeSaQVtfWyU=/.
[  +53 ms] Successfully connected to service protocol: http://127.0.0.1:50064/gUjAAG9FpeY=/
[  +22 ms] DevFS: Creating new filesystem on the device (null)
[  +20 ms] DevFS: Created new filesystem on the device
(file:///C:/Users/it/AppData/Local/Temp/caps_bugfbfc6ab2/caps_bug/)
[   +2 ms] Updating assets
[  +70 ms] Syncing files to device Windows...
[   +2 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] Processing bundle.
[   +1 ms] <- recompile package:caps_bug/main.dart 3fa63625-4029-4a64-ba47-ffed304190d4
[        ] <- 3fa63625-4029-4a64-ba47-ffed304190d4
[   +1 ms] Bundle processing done.
[  +72 ms] Updating files.
[        ] DevFS: Sync finished
[   +1 ms] Syncing files to device Windows... (completed in 79ms)
[        ] Synced 0.0MB.
[   +1 ms] <- accept
[   +2 ms] Connected to _flutterView/0x165a5c99210.
[   +2 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 🔥🔥🔥
[   +3 ms] 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:50068/xeSaQVtfWyU=/
[ +254 ms] The Flutter DevTools debugger and profiler on Windows is available at:
                    http://127.0.0.1:9100?uri=http://127.0.0.1:50068/xeSaQVtfWyU=/
[+15209 ms] Service protocol connection closed.
[        ] Lost connection to device.
[   +2 ms] DevFS: Deleting filesystem on the device (file:///C:/Users/it/AppData/Local/Temp/caps_bugfbfc6ab2/caps_bug/)
[ +265 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[   +9 ms] "flutter run" took 32,741ms.
[  +75 ms] ensureAnalyticsSent: 73ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0
PS C:\Users\it\caps_bug>
```

(Character limit reached, see reply for logs of second example)

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
PS C:\Users\it\caps_bug> flutter analyze
Analyzing caps_bug...

   info - Prefer const with constant constructors - lib\main.dart:31:16 - prefer_const_constructors
   info - Prefer const literals as parameters of constructors on @immutable classes - lib\main.dart:36:21 - prefer_const_literals_to_create_immutables
   info - Prefer const with constant constructors - lib\main.dart:37:13 - prefer_const_constructors

3 issues found. (ran in 14.6s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
PS C:\Users\it> flutter doctor -v
[✓] Flutter (Channel stable, 2.10.0, on Microsoft Windows [Version 10.0.22000.556], locale en-US)
    • Flutter version 2.10.0 at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5f105a6ca7 (9 weeks ago), 2022-02-01 14:15:42 -0800
    • Engine revision 776efd2034
    • Dart version 2.16.0
    • DevTools version 2.9.2

[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\it\AppData\Local\Android\sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.5)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.31729.503
    • Windows 10 SDK version 10.0.19041.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 (version 1.65.1)
    • VS Code at C:\Users\it\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.36.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.556]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 99.0.4844.84
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 99.0.1150.55

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
```

</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.
-->