Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@Skip(
'This file is skipped due to a cross-import that needs to be fixed. Tracked in https://github.com/flutter/flutter/issues/177028.',
)
import 'dart:async' show unawaited;
import 'dart:math' as math;

import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart' show DragStartBehavior;
import 'package:material_ui/material_ui.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
import 'package:material_ui/material_ui.dart';

import '../widgets/semantics_tester.dart';
import 'semantics_tester.dart';

// From bottom_sheet.dart.
const Duration _bottomSheetExitDuration = Duration(milliseconds: 200);
Expand Down Expand Up @@ -1081,7 +1079,7 @@ void main() {
};
await tester.pumpWidget(MaterialApp(routes: routes));

Navigator.pushNamed(rootKey.currentContext!, '/scaffold');
unawaited(Navigator.pushNamed(rootKey.currentContext!, '/scaffold'));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a warning for this change?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel we should remove the unawaited here just to make our coding style in sync.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be required. I think it was staged in flutter/flutter and waiting on the code freeze. The lint might be enabled in flutter/packages, where it's still pending in flutter/flutter. flutter/flutter#168555

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there was 2 failures in linux_analyze_stable test if we don't remove it.

await tester.pump();
await tester.pump(const Duration(seconds: 1));

Expand Down Expand Up @@ -1125,7 +1123,7 @@ void main() {
),
);

tester.state<NavigatorState>(find.byType(Navigator)).push(routeBuilder());
unawaited(tester.state<NavigatorState>(find.byType(Navigator)).push(routeBuilder()));

await tester.pump();
await tester.pump(const Duration(seconds: 1));
Expand Down
Loading