mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-02-18 00:17:40 +01:00
Fix code review issues: error message and type mismatch
Co-authored-by: jonasbark <1151304+jonasbark@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,7 @@ abstract class KeyPressSimulatorPlatform extends PlatformInterface {
|
||||
}
|
||||
|
||||
Future<void> simulateMouseClick(Offset position, {required bool keyDown}) {
|
||||
throw UnimplementedError('simulateKeyPress() has not been implemented.');
|
||||
throw UnimplementedError('simulateMouseClick() has not been implemented.');
|
||||
}
|
||||
|
||||
Future<void> simulateMediaKey(PhysicalKeyboardKey mediaKey) {
|
||||
|
||||
@@ -258,7 +258,7 @@ void KeypressSimulatorWindowsPlugin::SimulateMediaKey(
|
||||
std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result) {
|
||||
|
||||
const EncodableMap& args = std::get<EncodableMap>(*method_call.arguments());
|
||||
int64_t keyCode = std::get<int>(args.at(EncodableValue("keyCode")));
|
||||
int64_t keyCode = std::get<std::int64_t>(args.at(EncodableValue("keyCode")));
|
||||
|
||||
// Map Flutter media key codes to Windows virtual key codes
|
||||
// Flutter uses USB HID usage codes in the format 0x0007XXXX
|
||||
|
||||
Reference in New Issue
Block a user