BertrandBev / code_field

A customizable code text field supporting syntax highlighting
https://bertrandbev.github.io/code_field/
MIT License
232 stars 61 forks source link

Use onKeyEvent instead of onKey in FocusNode #66

Open alexeyinkin opened 2 years ago

alexeyinkin commented 2 years ago

Here we use onKey to set the listener on FocusNode: https://github.com/BertrandBev/code_field/blob/66d4e56f14bc0073cd967149a929c6b670ffc74c/lib/src/code_field/code_field.dart#L121

The doc says it is a legacy property and will be deprecated in the future. The recommended alternative is onKeyEvent.