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

Correctly pass the widget tree to the KeyboardListener so that it wraps the listening area. #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DPohorielov
Copy link

Improves: no need to find a place to put BarcodeScannerWidget, adding more complexity into layouts stretching.
Fixes: even properly placed KeyboardListener won't capture keyboard event without a child widget tree (therefore it's required)

Usage:

Old:

Column(children:[
content,
barcodeScannerWidget,
])

New:

BarcodeScannerWidget(children:[
content,
scanners: [
UsbKeyboardScanner(child: content),
],
])

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

Successfully merging this pull request may close these issues.

1 participant