Skip to content

Add documentation note that RawKeyboard is legacy API #118534

@st-pasha

Description

@st-pasha

Use case

The HardwareKeyboard class mentions that:

RawKeyboard is the legacy API, and will be deprecated and removed in the future. It is recommended to always use HardwareKeyboard and KeyEvent APIs (such as FocusNode.onKeyEvent) to handle key events.

At the same time, the RawKeyboard class doesn't mention anything about HardwareKeyboard at all. As a result, it is easy to start using the RawKeyboard API by accident, if you came across that class first.

Proposal

Add a comment in the RawKeyboard class saying that developers should prefer the HardwareKeyboard class instead, similar to the note in the HardwareKeyboard class.

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsd: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions