Test WidgetTester handling test pointers (#83337)

Adds tests to the following behaviors, which have existed without tests:

- When tapping during live testing, a message is printed with widgets that contain the tap location.
- When tapping during live testing, a mark is displayed on screen on the tap location.
This commit is contained in:
Tong Mu
2021-06-02 11:50:09 -07:00
committed by GitHub
parent 4ddaa13d01
commit e3da1bd7aa
10 changed files with 453 additions and 50 deletions

View File

@@ -42,7 +42,7 @@ class KeyboardKeysCodeGenerator extends BaseCodeGenerator {
final String firstComment = _wrapString('Represents the location of the '
'"${entry.commentName}" key on a generalized keyboard.');
final String otherComments = _wrapString('See the function '
'[RawKeyEvent.physicalKey] for more information.');
'[KeyEvent.physical] for more information.');
definitions.write('''
$firstComment ///
@@ -67,7 +67,7 @@ $otherComments static const PhysicalKeyboardKey ${entry.constantName} = Physica
final StringBuffer definitions = StringBuffer();
void printKey(int flutterId, String constantName, String commentName, {String? otherComments}) {
final String firstComment = _wrapString('Represents the logical "$commentName" key on the keyboard.');
otherComments ??= _wrapString('See the function [RawKeyEvent.logicalKey] for more information.');
otherComments ??= _wrapString('See the function [KeyEvent.logical] for more information.');
definitions.write('''
$firstComment ///