This commit is contained in:
Janice Collins
2021-07-01 15:06:05 -07:00
committed by GitHub
parent b0bd7cf1d8
commit 52e2ca38fc
8 changed files with 27 additions and 20 deletions

View File

@@ -178,13 +178,14 @@ class BySemanticsLabel extends SerializableFinder {
}
}
/// A Flutter Driver finder that finds widgets by [text] inside a [Text] or
/// [EditableText] widget.
/// A Flutter Driver finder that finds widgets by [text] inside a
/// [widgets.Text] or [widgets.EditableText] widget.
class ByText extends SerializableFinder {
/// Creates a text finder given the text.
const ByText(this.text);
/// The text that appears inside the [Text] or [EditableText] widget.
/// The text that appears inside the [widgets.Text] or [widgets.EditableText]
/// widget.
final String text;
@override

View File

@@ -742,7 +742,8 @@ abstract class FlutterDriver {
class CommonFinders {
const CommonFinders._();
/// Finds [Text] and [EditableText] widgets containing string equal to [text].
/// Finds [widgets.Text] and [widgets.EditableText] widgets containing string
/// equal to [text].
SerializableFinder text(String text) => ByText(text);
/// Finds widgets by [key]. Only [String] and [int] values can be used.