diff --git a/lib/groups_field.dart b/lib/groups_field.dart index 5620c31..ce83636 100644 --- a/lib/groups_field.dart +++ b/lib/groups_field.dart @@ -394,7 +394,8 @@ class _GroupsFieldState extends State { child: RawKeyboardListener( focusNode: _focusNode, onKey: (event) { - if (event.logicalKey == widget.keyForTriggerRemoveField) { + if (event is RawKeyUpEvent && + event.logicalKey == widget.keyForTriggerRemoveField) { _isRemovedFieldKeyPressed = true; final currentText = _textEditingController.text; if (currentText.isEmpty) { diff --git a/pubspec.yaml b/pubspec.yaml index ea4455d..8dd3838 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: groups_field description: Group widgets by some attribute. publish_to: "none" -version: 0.2.0 +version: 0.2.1 environment: sdk: ">=2.17.0 <3.0.0"