Unverified Commit 7ffb80b9 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Fix typos in keyboard code (#78464)

parent e6f2bc86
...@@ -228,11 +228,11 @@ abstract class RawKeyEventData { ...@@ -228,11 +228,11 @@ abstract class RawKeyEventData {
String get keyLabel; String get keyLabel;
/// Whether a key down event, and likewise its accompanying key up event, /// Whether a key down event, and likewise its accompanying key up event,
/// should be disapatched. /// should be dispatched.
/// ///
/// Certain events on some platforms should not be dispatched to listeners /// Certain events on some platforms should not be dispatched to listeners
/// according to Flutter's event model. For example, on macOS, Fn keys are /// according to Flutter's event model. For example, on macOS, Fn keys are
/// skipped to be consistant with other platform. On Win32, events dispatched /// skipped to be consistent with other platform. On Win32, events dispatched
/// for IME (`VK_PROCESSKEY`) are also skipped. /// for IME (`VK_PROCESSKEY`) are also skipped.
/// ///
/// This method will be called upon every down events. By default, this method /// This method will be called upon every down events. By default, this method
...@@ -284,7 +284,6 @@ abstract class RawKeyEvent with Diagnosticable { ...@@ -284,7 +284,6 @@ abstract class RawKeyEvent with Diagnosticable {
final RawKeyEventData data; final RawKeyEventData data;
String? character; String? character;
final String keymap = message['keymap'] as String;
if (kIsWeb) { if (kIsWeb) {
final String? key = message['key'] as String?; final String? key = message['key'] as String?;
data = RawKeyEventDataWeb( data = RawKeyEventDataWeb(
...@@ -296,6 +295,7 @@ abstract class RawKeyEvent with Diagnosticable { ...@@ -296,6 +295,7 @@ abstract class RawKeyEvent with Diagnosticable {
character = key; character = key;
} }
} else { } else {
final String keymap = message['keymap'] as String;
switch (keymap) { switch (keymap) {
case 'android': case 'android':
data = RawKeyEventDataAndroid( data = RawKeyEventDataAndroid(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment