Skip to content

Commit 376d8ba

Browse files
authored
Remove key simulation obsolete comments (#122389)
Remove key simulation obsolete comments
1 parent ad5deb8 commit 376d8ba

File tree

2 files changed

+21
-26
lines changed

2 files changed

+21
-26
lines changed

packages/flutter_test/lib/src/controller.dart

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ class SemanticsController {
132132
/// See also:
133133
///
134134
/// * [containsSemantics] and [matchesSemantics], which can be used to match
135-
/// against a single node in the traversal
135+
/// against a single node in the traversal.
136136
/// * [containsAllInOrder], which can be given an [Iterable<Matcher>] to fuzzy
137137
/// match the order allowing extra nodes before after and between matching
138-
/// parts of the traversal
138+
/// parts of the traversal.
139139
/// * [orderedEquals], which can be given an [Iterable<Matcher>] to exactly
140-
/// match the order of the traversal
140+
/// match the order of the traversal.
141141
Iterable<SemanticsNode> simulatedAccessibilityTraversal({Finder? start, Finder? end}) {
142142
TestAsyncUtils.guardSync();
143143
final List<SemanticsNode> traversal = <SemanticsNode>[];
@@ -784,8 +784,10 @@ abstract class WidgetController {
784784
///
785785
/// The [WidgetTester] subclass implements this by deferring to the [binding].
786786
///
787-
/// See also [SchedulerBinding.endOfFrame], which returns a future that could
788-
/// be appropriate to return in the implementation of this method.
787+
/// See also:
788+
///
789+
/// * [SchedulerBinding.endOfFrame], which returns a future that could be
790+
/// appropriate to return in the implementation of this method.
789791
Future<void> pump([Duration duration]);
790792

791793
/// Repeatedly calls [pump] with the given `duration` until there are no
@@ -1110,8 +1112,9 @@ abstract class WidgetController {
11101112
///
11111113
/// See also:
11121114
/// * [WidgetController.drag], a method to simulate a drag.
1113-
/// * [WidgetController.timedDrag], a method to simulate the drag of a given widget in a given duration.
1114-
/// It sends move events at a given frequency and it is useful when there are listeners involved.
1115+
/// * [WidgetController.timedDrag], a method to simulate the drag of a given
1116+
/// widget in a given duration. It sends move events at a given frequency and
1117+
/// it is useful when there are listeners involved.
11151118
/// * [WidgetController.fling], a method to simulate a fling.
11161119
Future<TestGesture> startGesture(
11171120
Offset downLocation, {
@@ -1313,8 +1316,7 @@ abstract class WidgetController {
13131316
/// Specify `platform` as one of the platforms allowed in
13141317
/// [platform.Platform.operatingSystem] to make the event appear to be from
13151318
/// that type of system. Defaults to "web" on web, and "android" everywhere
1316-
/// else. Must not be null. Some platforms (e.g. Windows, iOS) are not yet
1317-
/// supported.
1319+
/// else. Must not be null.
13181320
///
13191321
/// Specify the `physicalKey` for the event to override what is included in
13201322
/// the simulated event. If not specified, it uses a default from the US
@@ -1359,8 +1361,7 @@ abstract class WidgetController {
13591361
/// Specify `platform` as one of the platforms allowed in
13601362
/// [platform.Platform.operatingSystem] to make the event appear to be from
13611363
/// that type of system. Defaults to "web" on web, and "android" everywhere
1362-
/// else. Must not be null. Some platforms (e.g. Windows, iOS) are not yet
1363-
/// supported.
1364+
/// else. Must not be null.
13641365
///
13651366
/// Specify the `physicalKey` for the event to override what is included in
13661367
/// the simulated event. If not specified, it uses a default from the US
@@ -1433,7 +1434,7 @@ abstract class WidgetController {
14331434
/// Specify `platform` as one of the platforms allowed in
14341435
/// [platform.Platform.operatingSystem] to make the event appear to be from that type
14351436
/// of system. Defaults to "web" on web, and "android" everywhere else. Must not be
1436-
/// null. Some platforms (e.g. Windows, iOS) are not yet supported.
1437+
/// null.
14371438
///
14381439
/// Specify the `physicalKey` for the event to override what is included in
14391440
/// the simulated event. If not specified, it uses a default from the US
@@ -1639,12 +1640,12 @@ class LiveWidgetController extends WidgetController {
16391640
for (final PointerEventRecord record in records) {
16401641
final DateTime now = clock.now();
16411642
startTime ??= now;
1642-
// So that the first event is promised to receive a zero timeDiff
1643+
// So that the first event is promised to receive a zero timeDiff.
16431644
final Duration timeDiff = record.timeDelay - now.difference(startTime);
16441645
if (timeDiff.isNegative) {
16451646
// This happens when something (e.g. GC) takes a long time during the
16461647
// processing of the events.
1647-
// Flush all past events
1648+
// Flush all past events.
16481649
handleTimeStampDiff.add(-timeDiff);
16491650
record.events.forEach(binding.handlePointerEvent);
16501651
} else {

packages/flutter_test/lib/src/event_simulation.dart

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,7 @@ class KeyEventSimulator {
742742
///
743743
/// Specify `platform` as one of the platforms allowed in
744744
/// [Platform.operatingSystem] to make the event appear to be from that type of
745-
/// system. Defaults to the operating system that the test is running on. Some
746-
/// platforms (e.g. Windows, iOS) are not yet supported.
745+
/// system. Defaults to the operating system that the test is running on.
747746
///
748747
/// Keys that are down when the test completes are cleared after each test.
749748
///
@@ -790,8 +789,7 @@ class KeyEventSimulator {
790789
///
791790
/// Specify `platform` as one of the platforms allowed in
792791
/// [Platform.operatingSystem] to make the event appear to be from that type of
793-
/// system. Defaults to the operating system that the test is running on. Some
794-
/// platforms (e.g. Windows, iOS) are not yet supported.
792+
/// system. Defaults to the operating system that the test is running on.
795793
///
796794
/// Returns true if the key event was handled by the framework.
797795
///
@@ -835,8 +833,7 @@ class KeyEventSimulator {
835833
///
836834
/// Specify `platform` as one of the platforms allowed in
837835
/// [Platform.operatingSystem] to make the event appear to be from that type of
838-
/// system. Defaults to the operating system that the test is running on. Some
839-
/// platforms (e.g. Windows, iOS) are not yet supported.
836+
/// system. Defaults to the operating system that the test is running on.
840837
///
841838
/// Returns true if the key event was handled by the framework.
842839
///
@@ -885,8 +882,7 @@ class KeyEventSimulator {
885882
///
886883
/// Specify `platform` as one of the platforms allowed in
887884
/// [Platform.operatingSystem] to make the event appear to be from that type of
888-
/// system. Defaults to the operating system that the test is running on. Some
889-
/// platforms (e.g. Windows, iOS) are not yet supported.
885+
/// system. Defaults to the operating system that the test is running on.
890886
///
891887
/// Keys that are down when the test completes are cleared after each test.
892888
///
@@ -920,8 +916,7 @@ Future<bool> simulateKeyDownEvent(
920916
///
921917
/// Specify `platform` as one of the platforms allowed in
922918
/// [Platform.operatingSystem] to make the event appear to be from that type of
923-
/// system. Defaults to the operating system that the test is running on. Some
924-
/// platforms (e.g. Windows, iOS) are not yet supported.
919+
/// system. Defaults to the operating system that the test is running on.
925920
///
926921
/// Returns true if the key event was handled by the framework.
927922
///
@@ -949,8 +944,7 @@ Future<bool> simulateKeyUpEvent(
949944
///
950945
/// Specify `platform` as one of the platforms allowed in
951946
/// [Platform.operatingSystem] to make the event appear to be from that type of
952-
/// system. Defaults to the operating system that the test is running on. Some
953-
/// platforms (e.g. Windows, iOS) are not yet supported.
947+
/// system. Defaults to the operating system that the test is running on.
954948
///
955949
/// Returns true if the key event was handled by the framework.
956950
///

0 commit comments

Comments
 (0)