mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
removed new keyword (#75049)
This commit is contained in:
parent
014e689087
commit
091a74dab6
|
@ -58,8 +58,8 @@ class CommonFinders {
|
||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// // Suppose you have a button with text 'Update' in it:
|
/// // Suppose you have a button with text 'Update' in it:
|
||||||
/// new Button(
|
/// Button(
|
||||||
/// child: new Text('Update')
|
/// child: Text('Update')
|
||||||
/// )
|
/// )
|
||||||
///
|
///
|
||||||
/// // You can find and tap on it like this:
|
/// // You can find and tap on it like this:
|
||||||
|
@ -125,8 +125,8 @@ class CommonFinders {
|
||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// // Suppose you have a button with icon 'arrow_forward' in it:
|
/// // Suppose you have a button with icon 'arrow_forward' in it:
|
||||||
/// new Button(
|
/// Button(
|
||||||
/// child: new Icon(Icons.arrow_forward)
|
/// child: Icon(Icons.arrow_forward)
|
||||||
/// )
|
/// )
|
||||||
///
|
///
|
||||||
/// // You can find and tap on it like this:
|
/// // You can find and tap on it like this:
|
||||||
|
@ -167,8 +167,8 @@ class CommonFinders {
|
||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// // Suppose you have a button created like this:
|
/// // Suppose you have a button created like this:
|
||||||
/// Widget myButton = new Button(
|
/// Widget myButton = Button(
|
||||||
/// child: new Text('Update')
|
/// child: Text('Update')
|
||||||
/// );
|
/// );
|
||||||
///
|
///
|
||||||
/// // You can find and tap on it like this:
|
/// // You can find and tap on it like this:
|
||||||
|
|
|
@ -144,11 +144,11 @@ Future<void> _runSkippedTest(Suite suiteConfig, Test test, List<Group> parents,
|
||||||
/// // ...
|
/// // ...
|
||||||
/// }, onPlatform: {
|
/// }, onPlatform: {
|
||||||
/// // This test is especially slow on Windows.
|
/// // This test is especially slow on Windows.
|
||||||
/// 'windows': new Timeout.factor(2),
|
/// 'windows': Timeout.factor(2),
|
||||||
/// 'browser': [
|
/// 'browser': [
|
||||||
/// new Skip('TODO: add browser support'),
|
/// Skip('TODO: add browser support'),
|
||||||
/// // This will be slow on browsers once it works on them.
|
/// // This will be slow on browsers once it works on them.
|
||||||
/// new Timeout.factor(2)
|
/// Timeout.factor(2)
|
||||||
/// ]
|
/// ]
|
||||||
/// });
|
/// });
|
||||||
///
|
///
|
||||||
|
|
|
@ -100,7 +100,7 @@ typedef WidgetTesterCallback = Future<void> Function(WidgetTester widgetTester);
|
||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// testWidgets('MyWidget', (WidgetTester tester) async {
|
/// testWidgets('MyWidget', (WidgetTester tester) async {
|
||||||
/// await tester.pumpWidget(new MyWidget());
|
/// await tester.pumpWidget(MyWidget());
|
||||||
/// await tester.tap(find.text('Save'));
|
/// await tester.tap(find.text('Save'));
|
||||||
/// expect(find.text('Success'), findsOneWidget);
|
/// expect(find.text('Success'), findsOneWidget);
|
||||||
/// });
|
/// });
|
||||||
|
@ -371,8 +371,8 @@ const String kDebugWarning = '''
|
||||||
/// main() async {
|
/// main() async {
|
||||||
/// assert(false); // fail in checked mode
|
/// assert(false); // fail in checked mode
|
||||||
/// await benchmarkWidgets((WidgetTester tester) async {
|
/// await benchmarkWidgets((WidgetTester tester) async {
|
||||||
/// await tester.pumpWidget(new MyWidget());
|
/// await tester.pumpWidget(MyWidget());
|
||||||
/// final Stopwatch timer = new Stopwatch()..start();
|
/// final Stopwatch timer = Stopwatch()..start();
|
||||||
/// for (int index = 0; index < 10000; index += 1) {
|
/// for (int index = 0; index < 10000; index += 1) {
|
||||||
/// await tester.tap(find.text('Tap me'));
|
/// await tester.tap(find.text('Tap me'));
|
||||||
/// await tester.pump();
|
/// await tester.pump();
|
||||||
|
|
Loading…
Reference in a new issue