flutter/packages/flutter_test
Greg Spencer 0e6cb28dbe
Add fake keyboard key generation to the testing framework (#40706)
There were four or five different implementations in various tests for sendFakeKeyEvent, which roughly all did the same thing. I was going to add yet another one, and decided that it needed to be generalized and centralized. This replaces those instances with something that just takes a LogicalKeyboardKey so that it's self-documenting, and can be used with multiple platforms.

This adds two functions to widget tester: sendKeyDownEvent and sendKeyUpEvent which simulate key up/down from a physical keyboard. It also adds global functions simulateKeyDownEvent and simulateKeyUpEvent that can be called without a widget tester. All are async functions protected by the async guard.
2019-09-24 08:14:38 -07:00
..
lib Add fake keyboard key generation to the testing framework (#40706) 2019-09-24 08:14:38 -07:00
test Add fake keyboard key generation to the testing framework (#40706) 2019-09-24 08:14:38 -07:00
BUILD.gn Update BUILD.gn for package:flutter_test (#38916) 2019-08-20 15:10:23 -07:00
pubspec.yaml ensure dart2js does not compile unsupported packages (#40368) 2019-09-12 15:25:21 -07:00