mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
[test] make CommonFinders constructor private to disallow extensions (#3371)
This commit is contained in:
parent
27715e1d41
commit
db2f66aab1
@ -38,7 +38,7 @@ void testWidgets(void callback(WidgetTester widgetTester)) {
|
|||||||
/// tester.widget(find.byType(MyWidget));
|
/// tester.widget(find.byType(MyWidget));
|
||||||
/// tester.stateOf(find.byConfig(config));
|
/// tester.stateOf(find.byConfig(config));
|
||||||
/// tester.getSize(find.byKey(new ValueKey('save-button')));
|
/// tester.getSize(find.byKey(new ValueKey('save-button')));
|
||||||
const CommonFinders find = const CommonFinders();
|
const CommonFinders find = const CommonFinders._();
|
||||||
|
|
||||||
/// Asserts that [finder] locates a widget in the test element tree.
|
/// Asserts that [finder] locates a widget in the test element tree.
|
||||||
///
|
///
|
||||||
@ -239,7 +239,7 @@ class WidgetTester {
|
|||||||
|
|
||||||
/// Provides lightweight syntax for getting frequently used widget [Finder]s.
|
/// Provides lightweight syntax for getting frequently used widget [Finder]s.
|
||||||
class CommonFinders {
|
class CommonFinders {
|
||||||
const CommonFinders();
|
const CommonFinders._();
|
||||||
|
|
||||||
/// Finds [Text] widgets containing string equal to [text].
|
/// Finds [Text] widgets containing string equal to [text].
|
||||||
Finder text(String text) => new _TextFinder(text);
|
Finder text(String text) => new _TextFinder(text);
|
||||||
|
Loading…
Reference in New Issue
Block a user