mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
platform_design: Enforce use_key_in_widget_constructors (#927)
This commit is contained in:
@@ -11,7 +11,7 @@ import 'package:platform_design/main.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Can change platform correctly', (tester) async {
|
||||
await tester.pumpWidget(MyAdaptingApp());
|
||||
await tester.pumpWidget(const MyAdaptingApp());
|
||||
|
||||
// The test should be able to find the drawer button.
|
||||
expect(find.byIcon(Icons.menu), findsOneWidget);
|
||||
@@ -19,7 +19,7 @@ void main() {
|
||||
expect(find.byIcon(Icons.refresh), findsOneWidget);
|
||||
|
||||
debugDefaultTargetPlatformOverride = TargetPlatform.iOS;
|
||||
await tester.pumpWidget(MyAdaptingApp());
|
||||
await tester.pumpWidget(const MyAdaptingApp());
|
||||
|
||||
// There should now be a large title style nav bar.
|
||||
expect(find.byType(CupertinoSliverNavigationBar), findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user