1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-13 19:08:41 +00:00

3.38 / 3.10 (#2742)

This PR makes samples pass CI when 3.10 is released.

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [x] I have added sample code updates to the [changelog].
- [x] I updated/added relevant documentation (doc comments with `///`).
This commit is contained in:
Eric Windmill
2025-11-12 11:46:47 -08:00
committed by GitHub
parent 744a2653c9
commit 3adcdc929a
13 changed files with 79 additions and 101 deletions

View File

@@ -9,13 +9,11 @@ import 'package:testing_app/main.dart';
void main() {
group('Testing App Performance Tests', () {
final binding =
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized();
// The fullyLive frame policy simulates
// the way Flutter responds to animations.
binding.framePolicy =
LiveTestWidgetsFlutterBindingFramePolicy.fullyLive;
binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive;
testWidgets('Scrolling test', (tester) async {
await tester.pumpWidget(const TestingApp());

View File

@@ -41,8 +41,7 @@ class FavoriteItemTile extends StatelessWidget {
padding: const EdgeInsets.all(8.0),
child: ListTile(
leading: CircleAvatar(
backgroundColor:
Colors.primaries[itemNo % Colors.primaries.length],
backgroundColor: Colors.primaries[itemNo % Colors.primaries.length],
),
title: Text('Item $itemNo', key: Key('favorites_text_$itemNo')),
trailing: IconButton(

View File

@@ -52,8 +52,7 @@ class ItemTile extends StatelessWidget {
padding: const EdgeInsets.all(8.0),
child: ListTile(
leading: CircleAvatar(
backgroundColor:
Colors.primaries[itemNo % Colors.primaries.length],
backgroundColor: Colors.primaries[itemNo % Colors.primaries.length],
),
title: Text('Item $itemNo', key: Key('text_$itemNo')),
trailing: IconButton(

View File

@@ -52,9 +52,7 @@ void main() {
await tester.pumpAndSettle();
// Get the total number of items available.
final totalItems = tester
.widgetList(find.byIcon(Icons.close))
.length;
final totalItems = tester.widgetList(find.byIcon(Icons.close)).length;
// Remove one item.
await tester.tap(find.byIcon(Icons.close).first);