BoundaryAwareKeyDirective.keypress constructor

BoundaryAwareKeyDirective.keypress(
  1. Element element,
  2. @Optional() KeyUpBoundaryDirective? boundary
)

Implementation

BoundaryAwareKeyDirective.keypress(
    Element element, @Optional() KeyUpBoundaryDirective? boundary) {
  final stream =
      boundary?.keyPressStream ?? Element.keyPressEvent.forElement(element);
  _subscription = stream.where(_isKeyMatching).listen(_onMatchingKey);
}