Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred when delete characters in TerminalView #162

Open
mr-wolf-gb opened this issue Feb 17, 2023 · 0 comments
Open

An error occurred when delete characters in TerminalView #162

mr-wolf-gb opened this issue Feb 17, 2023 · 0 comments

Comments

@mr-wolf-gb
Copy link

mr-wolf-gb commented Feb 17, 2023

  • when i delete characters with keyboard in the TerminalView an error occurred :

Trace

E/flutter ( 2518): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter/src/services/hardware_keyboard.dart': Failed assertion: line 432 pos 16: '_pressedKeys.containsKey(event.physicalKey)': A KeyUpEvent is dispatched, but the state shows that the physical key is not 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: KeyUpEvent#22039(physicalKey: PhysicalKeyboardKey#e6f4b(usbHidUsage: "0x0007002a", debugName: "Backspace"), logicalKey: LogicalKeyboardKey#147d9(keyId: "0x100000008", keyLabel: "Backspace", debugName: "Backspace"), character: null, timeStamp: 0:06:14.229717, synthesized)
E/flutter ( 2518): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter ( 2518): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter ( 2518): #2      HardwareKeyboard._assertEventIsRegular.<anonymous closure> (package:flutter/src/services/hardware_keyboard.dart:432:16)
E/flutter ( 2518): #3      HardwareKeyboard._assertEventIsRegular (package:flutter/src/services/hardware_keyboard.dart:443:6)
E/flutter ( 2518): #4      HardwareKeyboard.handleKeyEvent (package:flutter/src/services/hardware_keyboard.dart:535:5)
E/flutter ( 2518): #5      KeyEventManager.handleKeyData (package:flutter/src/services/hardware_keyboard.dart:881:29)
E/flutter ( 2518): #6      PlatformDispatcher._keyDataListener.<anonymous closure>.<anonymous closure> (dart:ui/platform_dispatcher.dart:430:41)
E/flutter ( 2518): #7      _invoke1 (dart:ui/hooks.dart:164:13)
E/flutter ( 2518): #8      PlatformDispatcher._keyDataListener.<anonymous closure> (dart:ui/platform_dispatcher.dart:428:7)
E/flutter ( 2518): #9      _invoke2 (dart:ui/hooks.dart:183:13)
E/flutter ( 2518): #10     _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:40:5)
E/flutter ( 2518): #11     _Channel.push (dart:ui/channel_buffers.dart:130:31)
E/flutter ( 2518): #12     ChannelBuffers.push (dart:ui/channel_buffers.dart:326:17)
E/flutter ( 2518): #13     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:664:22)
E/flutter ( 2518): #14     _dispatchPlatformMessage (dart:ui/hooks.dart:86:31)
E/flutter ( 2518): 

I think it's an error from the emulator not from package !

  • Also, why with android keyboard the TerminalView cursor not following text tapped

Code

child: TerminalView(
      terminal,
      padding: const EdgeInsets.all(5),
      autofocus: true,
      focusNode: focusNode,
      controller: controller,
      textStyle: TerminalStyle(
        fontSize: textSizeSMedium,
        fontFamily: GoogleFonts.inconsolata().fontFamily!,
      ),
      onTapUp: (p0, p1) {
        focusNode.requestFocus();
      },
      theme: generateTerminalTheme(themeName: "Argonaut"),
      cursorType: TerminalCursorType.verticalBar,
      alwaysShowCursor: true,
    ),

Result

Screenshot_20230217_113839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant