flutter-code-editor
flutter-code-editor copied to clipboard
Test read-only feature by simulating keyboard events
Navigation, Delete and Backspace are currently simulated with WidgetTester.sendKeyEvent. This triggers Flutter's Shortcuts mechanism. However, typing text cannot be simulated like this, and we merely set CodeController.value to the new value.
This is insufficient because it leaves key handlers untested while the read-only feature may evolve to use them and to block input there.