Skip to content

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

Open
DPohorielov wants to merge 2 commits intoicapps:mainfrom
DPohorielov:main
Open

Correctly pass the widget tree to the KeyboardListener so that it wraps the listening area.#16
DPohorielov wants to merge 2 commits intoicapps:mainfrom
DPohorielov:main

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