Repository: flutter
Issue: error
Labels: waiting for customer response,in triage

### Steps to reproduce

The following assertion was thrown during a platform message callback:
```
A KeyDownEvent is dispatched, but the state shows that the physical key is already pressed. If this occurs in real application, please report this bug to Flutter. If this occurs in unit tests, please ensure that simulated events follow Flutter's event model as documented in `HardwareKeyboard`. This was the event: KeyDownEvent#25b14(physicalKey: PhysicalKeyboardKey#ea6e1(usbHidUsage: "0x000700e0", debugName: "Control Left"), logicalKey: LogicalKeyboardKey#30261(keyId: "0x1100000000", keyLabel: "", debugName: "Key with ID 0x01100000000"), character: null, timeStamp: 0:03:15.533244)
'package:flutter/src/services/hardware_keyboard.dart':
Failed assertion: line 505 pos 16: '!_pressedKeys.containsKey(event.physicalKey)'
```

error.Log

when i use flutter_pickers alway show this error ,please help me to reslove this bug



### Expected results

show normal log and never show this

### Actual results

show normal log and never show this

### Code sample

<details open><summary>Code sample</summary>

```dart
[Paste your code here]

  void _selectBirthday(BuildContext context) {
    // FocusScope.of(context).unfocus();
    Pickers.showDatePicker(
      context,
      onConfirm: (PDuration p) {
        DateTime selectedDate = DateTime(p.year!, p.month!, p.day!);
        setState(() {
          _selectedBirthday = selectedDate;
          _birthdayString = formatDate(_selectedBirthday);
        });
      },
      mode: DateMode.YMD,
      suffix: Suffix(years: '年', month: '月', days: '日'),
      selectDate: PDuration(year: _selectedBirthday.year, month: _selectedBirthday.month, day: _selectedBirthday.day),
      pickerStyle: DefaultPickerStyle(),
    );
  }

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.yml

When the exception was thrown, this was the stack: 
#2      HardwareKeyboard._assertEventIsRegular.<anonymous closure> (package:flutter/src/services/hardware_keyboard.dart:505:16)
#3      HardwareKeyboard._assertEventIsRegular (package:flutter/src/services/hardware_keyboard.dart:520:6)
#4      HardwareKeyboard.handleKeyEvent (package:flutter/src/services/hardware_keyboard.dart:643:5)
#5      KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1164:37)
#6      BasicMessageChannel.setMessageHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:235:49)
#7      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:581:35)
#8      _invoke2 (dart:ui/hooks.dart:344:13)
#9      _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45:5)
#10     _Channel.push (dart:ui/channel_buffers.dart:135:31)
#11     ChannelBuffers.push (dart:ui/channel_buffers.dart:343:17)
#12     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:750:22)
#13     _dispatchPlatformMessage (dart:ui/hooks.dart:257:31)
(elided 2 frames from class _AssertionError)




```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[Paste your output here]
```

</details>