add missing trailing commas in list/set/map literals (#102585)

This commit is contained in:
Alexandre Ardhuin 2022-04-27 09:15:35 +02:00 committed by GitHub
parent 0b80f08cf0
commit 07f1c20474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
271 changed files with 1236 additions and 1141 deletions

View File

@ -13,10 +13,12 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:platform/platform.dart'; import 'package:platform/platform.dart';
// 1x1 colored pixel // 1x1 colored pixel
const List<int> _kFailPngBytes = <int>[137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, const List<int> _kFailPngBytes = <int>[
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0,
13, 73, 72, 68, 82, 0, 0, 0, 1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 13, 73, 72, 68, 82, 0, 0, 0, 1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137,
0, 0, 0, 13, 73, 68, 65, 84, 120, 1, 99, 249, 207, 240, 255, 63, 0, 7, 18, 3, 0, 0, 0, 13, 73, 68, 65, 84, 120, 1, 99, 249, 207, 240, 255, 63, 0, 7, 18, 3,
2, 164, 147, 160, 197, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130]; 2, 164, 147, 160, 197, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130,
];
void main() { void main() {
final MemoryFileSystem fs = MemoryFileSystem(); final MemoryFileSystem fs = MemoryFileSystem();

View File

@ -33,7 +33,7 @@ class _AnimatedComplexOpacityState extends State<AnimatedComplexOpacity> with Si
for (int i = 0; i < 20; i++) for (int i = 0; i < 20; i++)
FadeTransition(opacity: animation, child: Center( FadeTransition(opacity: animation, child: Center(
child: Transform.scale(scale: 1.01, child: const ModeratelyComplexWidget()), child: Transform.scale(scale: 1.01, child: const ModeratelyComplexWidget()),
)) )),
], ],
), ),
), ),

View File

@ -28,7 +28,7 @@ class OpacityPeepholePage extends StatelessWidget {
onPressed: () { onPressed: () {
Navigator.pushNamed(context, variant.route); Navigator.pushNamed(context, variant.route);
}, },
) ),
], ],
), ),
); );

View File

@ -62,7 +62,7 @@ class ListItem extends StatelessWidget {
_buildUserInfo(), _buildUserInfo(),
const SizedBox( const SizedBox(
height: 10, height: 10,
) ),
]; ];
if (index % 3 != 0) { if (index % 3 != 0) {
contents.add(_buildImageContent()); contents.add(_buildImageContent());
@ -140,7 +140,7 @@ class ListItem extends StatelessWidget {
), ),
const SizedBox( const SizedBox(
width: 15, width: 15,
) ),
], ],
); );
} }

View File

@ -93,7 +93,7 @@ class _PostBackdropFilterPageState extends State<PostBackdropFilterPage> with Ti
], ],
), ),
), ),
) ),
], ],
), ),
], ],

View File

@ -67,7 +67,7 @@ final GetStackPointerCallback getStackPointer = () {
// "mov r0, sp" in machine code: 0D00A0E1. // "mov r0, sp" in machine code: 0D00A0E1.
0x0d, 0x00, 0xa0, 0xe1, 0x0d, 0x00, 0xa0, 0xe1,
// "bx lr" in machine code: 1EFF2FE1. // "bx lr" in machine code: 1EFF2FE1.
0x1e, 0xff, 0x2f, 0xe1 0x1e, 0xff, 0x2f, 0xe1,
] ]
); );

View File

@ -393,7 +393,7 @@ class PaletteTabView extends StatelessWidget {
600, 600,
700, 700,
800, 800,
900 900,
]; ];
static const List<int> accentKeys = <int>[100, 200, 400, 700]; static const List<int> accentKeys = <int>[100, 200, 400, 700];

View File

@ -45,8 +45,8 @@ void main() {
position: location + movePerRun * t.toDouble(), position: location + movePerRun * t.toDouble(),
pointer: 1, pointer: 1,
delta: movePerRun, delta: movePerRun,
) ),
]) ]),
], ],
PointerEventRecord(totalTime, <PointerEvent>[ PointerEventRecord(totalTime, <PointerEvent>[
PointerUpEvent( PointerUpEvent(
@ -54,8 +54,8 @@ void main() {
timeStamp: totalTime - const Duration(milliseconds: 1), timeStamp: totalTime - const Duration(milliseconds: 1),
position: location + movePerRun * moveEventNumber.toDouble(), position: location + movePerRun * moveEventNumber.toDouble(),
pointer: 1, pointer: 1,
) ),
]) ]),
]; ];
binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.benchmarkLive; binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.benchmarkLive;

View File

@ -11,7 +11,7 @@ void main() {
'opacity_peephole_col_of_rows_perf', 'opacity_peephole_col_of_rows_perf',
<ScrollableButtonRoute>[ <ScrollableButtonRoute>[
ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName), ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName),
ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeOpacityOfColOfRowsRouteName) ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeOpacityOfColOfRowsRouteName),
], ],
pageDelay: const Duration(seconds: 1), pageDelay: const Duration(seconds: 1),
duration: const Duration(seconds: 10), duration: const Duration(seconds: 10),

View File

@ -11,7 +11,7 @@ void main() {
'opacity_peephole_fade_transition_text_perf', 'opacity_peephole_fade_transition_text_perf',
<ScrollableButtonRoute>[ <ScrollableButtonRoute>[
ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName), ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName),
ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeFadeTransitionTextRouteName) ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeFadeTransitionTextRouteName),
], ],
pageDelay: const Duration(seconds: 1), pageDelay: const Duration(seconds: 1),
duration: const Duration(seconds: 10), duration: const Duration(seconds: 10),

View File

@ -11,7 +11,7 @@ void main() {
'opacity_peephole_grid_of_opacity_perf', 'opacity_peephole_grid_of_opacity_perf',
<ScrollableButtonRoute>[ <ScrollableButtonRoute>[
ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName), ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName),
ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeGridOfOpacityRouteName) ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeGridOfOpacityRouteName),
], ],
pageDelay: const Duration(seconds: 1), pageDelay: const Duration(seconds: 1),
duration: const Duration(seconds: 10), duration: const Duration(seconds: 10),

View File

@ -11,7 +11,7 @@ void main() {
'opacity_peephole_one_rect_perf', 'opacity_peephole_one_rect_perf',
<ScrollableButtonRoute>[ <ScrollableButtonRoute>[
ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName), ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName),
ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeOneRectRouteName) ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeOneRectRouteName),
], ],
pageDelay: const Duration(seconds: 1), pageDelay: const Duration(seconds: 1),
duration: const Duration(seconds: 10), duration: const Duration(seconds: 10),

View File

@ -11,7 +11,7 @@ void main() {
'opacity_peephole_opacity_of_grid_perf', 'opacity_peephole_opacity_of_grid_perf',
<ScrollableButtonRoute>[ <ScrollableButtonRoute>[
ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName), ScrollableButtonRoute(kScrollableName, kOpacityPeepholeRouteName),
ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeOpacityOfGridRouteName) ScrollableButtonRoute(kOpacityScrollableName, kOpacityPeepholeOpacityOfGridRouteName),
], ],
pageDelay: const Duration(seconds: 1), pageDelay: const Duration(seconds: 1),
duration: const Duration(seconds: 10), duration: const Duration(seconds: 10),

View File

@ -78,7 +78,7 @@ void main() {
'integer': 1234, 'integer': 1234,
'string': 'This is a performance test.', 'string': 'This is a performance test.',
'float': 1.25, 'float': 1.25,
'boolean': true 'boolean': true,
}); });
} }
watch.stop(); watch.stop();

View File

@ -81,7 +81,7 @@ void main() {
'integer': 1234, 'integer': 1234,
'string': 'This is a performance test.', 'string': 'This is a performance test.',
'float': 1.25, 'float': 1.25,
'boolean': true 'boolean': true,
})); }));
} }
watch.stop(); watch.stop();

View File

@ -160,7 +160,7 @@ class _MyHomePageState extends State<MyHomePage> {
0.0), // 10% of the width, so there are ten blinds. 0.0), // 10% of the width, so there are ten blinds.
colors: <Color>[ colors: <Color>[
Color(0xffee0000), Color(0xffee0000),
Color(0xffeeee00) Color(0xffeeee00),
], // red to yellow ], // red to yellow
tileMode: TileMode tileMode: TileMode
.repeated, // repeats the gradient over the canvas .repeated, // repeats the gradient over the canvas
@ -172,7 +172,7 @@ class _MyHomePageState extends State<MyHomePage> {
CustomPaint( CustomPaint(
painter: Sky(), painter: Sky(),
size: const Size(200.0, 36.0), size: const Size(200.0, 36.0),
) ),
], ],
), ),
), ),

View File

@ -97,7 +97,7 @@ abstract class StockStrings {
static const List<Locale> supportedLocales = <Locale>[ static const List<Locale> supportedLocales = <Locale>[
Locale('en'), Locale('en'),
Locale('en', 'US'), Locale('en', 'US'),
Locale('es') Locale('es'),
]; ];
/// Title for the Stocks application /// Title for the Stocks application

View File

@ -638,7 +638,7 @@ Future<void> verifyNoBadImportsInFlutter(String workingDirectory) async {
'These are the exported packages:', 'These are the exported packages:',
...packages.map<String>((String path) => ' lib/$path.dart'), ...packages.map<String>((String path) => ' lib/$path.dart'),
'These are the directories:', 'These are the directories:',
...directories.map<String>((String path) => ' lib/src/$path/') ...directories.map<String>((String path) => ' lib/src/$path/'),
].join('\n')); ].join('\n'));
} }
// Verify that the imports are well-ordered. // Verify that the imports are well-ordered.
@ -1585,7 +1585,7 @@ Future<void> _checkConsumerDependencies() async {
'pub', 'pub',
'deps', 'deps',
'--json', '--json',
'--directory=${path.join(flutterRoot, 'packages', package)}' '--directory=${path.join(flutterRoot, 'packages', package)}',
]); ]);
if (result.exitCode != 0) { if (result.exitCode != 0) {
print(result.stdout as Object); print(result.stdout as Object);

View File

@ -239,7 +239,7 @@ Future<void> runWebServiceWorkerTest({
...<String, int>{ ...<String, int>{
'manifest.json': 1, 'manifest.json': 1,
'favicon.ico': 1, 'favicon.ico': 1,
} },
}); });
expect(reportedVersion, '1'); expect(reportedVersion, '1');
reportedVersion = null; reportedVersion = null;
@ -313,7 +313,7 @@ Future<void> runWebServiceWorkerTest({
...<String, int>{ ...<String, int>{
'manifest.json': 1, 'manifest.json': 1,
'favicon.ico': 1, 'favicon.ico': 1,
} },
}); });
expect(reportedVersion, '3'); expect(reportedVersion, '3');
@ -366,7 +366,7 @@ Future<void> runWebServiceWorkerTest({
...<String, int>{ ...<String, int>{
'manifest.json': 1, 'manifest.json': 1,
'favicon.ico': 1, 'favicon.ico': 1,
} },
}); });
expect(reportedVersion, '4'); expect(reportedVersion, '4');

View File

@ -1268,7 +1268,7 @@ Future<void> _runFlutterPluginsTests() async {
'core.longPaths=true', 'core.longPaths=true',
'clone', 'clone',
'https://github.com/flutter/plugins.git', 'https://github.com/flutter/plugins.git',
'.' '.',
], ],
workingDirectory: checkout.path, workingDirectory: checkout.path,
); );
@ -1329,7 +1329,7 @@ Future<void> _runSkpGeneratorTests() async {
'core.longPaths=true', 'core.longPaths=true',
'clone', 'clone',
'https://github.com/flutter/tests.git', 'https://github.com/flutter/tests.git',
'.' '.',
], ],
workingDirectory: checkout.path, workingDirectory: checkout.path,
); );

View File

@ -48,7 +48,7 @@ void main() {
command: <String>['echo', 'test',], command: <String>['echo', 'test',],
stdout: 'output', stdout: 'output',
stderr: 'error', stderr: 'error',
) ),
]); ]);
final ProcessRunner processRunner = ProcessRunner( final ProcessRunner processRunner = ProcessRunner(
subprocessOutput: false, platform: platform, processManager: fakeProcessManager); subprocessOutput: false, platform: platform, processManager: fakeProcessManager);
@ -62,7 +62,7 @@ void main() {
stdout: 'output', stdout: 'output',
stderr: 'error', stderr: 'error',
exitCode: -1, exitCode: -1,
) ),
]); ]);
final ProcessRunner processRunner = ProcessRunner( final ProcessRunner processRunner = ProcessRunner(
subprocessOutput: false, platform: platform, processManager: fakeProcessManager); subprocessOutput: false, platform: platform, processManager: fakeProcessManager);

View File

@ -151,7 +151,7 @@ abstract class Repository {
upstreamRemote.name, upstreamRemote.name,
'--', '--',
upstreamRemote.url, upstreamRemote.url,
checkoutDirectory.path checkoutDirectory.path,
], ],
'Cloning $name repo', 'Cloning $name repo',
workingDirectory: parentDirectory.path, workingDirectory: parentDirectory.path,
@ -302,7 +302,7 @@ abstract class Repository {
'merge-base', 'merge-base',
'--is-ancestor', '--is-ancestor',
possibleDescendant, possibleDescendant,
possibleAncestor possibleAncestor,
], ],
'verify $possibleAncestor is a direct ancestor of $possibleDescendant.', 'verify $possibleAncestor is a direct ancestor of $possibleDescendant.',
allowNonZeroExitCode: true, allowNonZeroExitCode: true,

View File

@ -171,7 +171,7 @@ String phaseInstructions(pb.ConductorState state) {
].join('\n'); ].join('\n');
} }
return <String>[ return <String>[
'Either all cherrypicks have been auto-applied or there were none.' 'Either all cherrypicks have been auto-applied or there were none.',
].join('\n'); ].join('\n');
case ReleasePhase.PUBLISH_VERSION: case ReleasePhase.PUBLISH_VERSION:
if (!requiresFrameworkPR(state)) { if (!requiresFrameworkPR(state)) {
@ -201,7 +201,7 @@ String phaseInstructions(pb.ConductorState state) {
'\t 1. Post announcement to discord', '\t 1. Post announcement to discord',
'\t 2. Post announcement flutter release hotline chat room', '\t 2. Post announcement flutter release hotline chat room',
'-----------------------------------------------------------------------', '-----------------------------------------------------------------------',
'This release has been completed.' 'This release has been completed.',
].join('\n'); ].join('\n');
} }
return <String>[ return <String>[
@ -211,7 +211,7 @@ String phaseInstructions(pb.ConductorState state) {
'\t 3. Post announcement to discord', '\t 3. Post announcement to discord',
'\t 4. Post announcement flutter release hotline chat room', '\t 4. Post announcement flutter release hotline chat room',
'-----------------------------------------------------------------------', '-----------------------------------------------------------------------',
'This release has been completed.' 'This release has been completed.',
].join('\n'); ].join('\n');
} }
// For analyzer // For analyzer

View File

@ -1124,7 +1124,7 @@ void main() {
FakeCommand( FakeCommand(
command: const <String>['git', 'push', '', 'HEAD:refs/heads/'], command: const <String>['git', 'push', '', 'HEAD:refs/heads/'],
exception: GitException(gitPushErrorMessage, <String>['git', 'push', '--force', '', 'HEAD:refs/heads/']), exception: GitException(gitPushErrorMessage, <String>['git', 'push', '--force', '', 'HEAD:refs/heads/']),
) ),
]); ]);
final NextContext nextContext = NextContext( final NextContext nextContext = NextContext(
autoAccept: false, autoAccept: false,

View File

@ -32,11 +32,12 @@ test.windows=.\test_utilities\bin\flutter_test_runner.bat repo_dashboard
<String>['git clone https://github.com/flutter/cocoon.git tests', 'git -C tests checkout abc123'])); <String>['git clone https://github.com/flutter/cocoon.git tests', 'git -C tests checkout abc123']));
if (Platform.isLinux || Platform.isMacOS) { if (Platform.isLinux || Platform.isMacOS) {
expect( expect(
test.tests, test.tests,
containsAllInOrder(<String>[ containsAllInOrder(<String>[
'./test_utilities/bin/flutter_test_runner.sh app_flutter', './test_utilities/bin/flutter_test_runner.sh app_flutter',
'./test_utilities/bin/flutter_test_runner.sh repo_dashboard' './test_utilities/bin/flutter_test_runner.sh repo_dashboard',
])); ]),
);
} else if (Platform.isWindows) { } else if (Platform.isWindows) {
expect(test.tests, containsAllInOrder(<String>['.\test_utilities\bin\flutter_test_runner.bat repo_dashboard'])); expect(test.tests, containsAllInOrder(<String>['.\test_utilities\bin\flutter_test_runner.bat repo_dashboard']));
} }

View File

@ -30,7 +30,7 @@ Future<void> main() async {
'io.flutter.devicelab', 'io.flutter.devicelab',
'--template', '--template',
'module', 'module',
'hello_module' 'hello_module',
], ],
); );
@ -410,7 +410,7 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
'ios-framework', 'ios-framework',
'--cocoapods', '--cocoapods',
'--force', // Allow podspec creation on master. '--force', // Allow podspec creation on master.
'--output=$cocoapodsOutputDirectoryName' '--output=$cocoapodsOutputDirectoryName',
], ],
); );
}); });

View File

@ -80,7 +80,7 @@ Future<TaskResult> _doTest() async {
'am', 'am',
'start', 'start',
'-n', '-n',
'$_bundleName/$_bundleName.$_activityName' '$_bundleName/$_bundleName.$_activityName',
]); ]);
await Future<void>.delayed(const Duration(seconds: 10)); await Future<void>.delayed(const Duration(seconds: 10));
final Map<String, dynamic> memoryStats = final Map<String, dynamic> memoryStats =
@ -93,7 +93,7 @@ Future<TaskResult> _doTest() async {
ListStatistics(totalMemorySamples); ListStatistics(totalMemorySamples);
final Map<String, dynamic> results = <String, dynamic>{ final Map<String, dynamic> results = <String, dynamic>{
...totalMemoryStatistics.asMap('totalMemory') ...totalMemoryStatistics.asMap('totalMemory'),
}; };
result = TaskResult.success(results, result = TaskResult.success(results,
benchmarkScoreKeys: results.keys.toList()); benchmarkScoreKeys: results.keys.toList());

View File

@ -90,7 +90,7 @@ class AaaPlugin: FlutterPlugin, MethodCallHandler {
options: <String>[ options: <String>[
'apk', 'apk',
'--debug', '--debug',
'--target-platform=android-arm' '--target-platform=android-arm',
], ],
); );
}); });

View File

@ -22,7 +22,7 @@ Future<void> main() async {
options: <String>[ options: <String>[
'apk', 'apk',
'--debug', '--debug',
'--target-platform=android-arm' '--target-platform=android-arm',
], ],
); );
}); });
@ -54,7 +54,7 @@ Future<void> main() async {
options: <String>[ options: <String>[
'apk', 'apk',
'--debug', '--debug',
'--target-platform=android-x86' '--target-platform=android-x86',
], ],
); );
}); });
@ -85,7 +85,7 @@ Future<void> main() async {
options: <String>[ options: <String>[
'apk', 'apk',
'--debug', '--debug',
'--target-platform=android-x64' '--target-platform=android-x64',
], ],
); );
}); });
@ -115,7 +115,7 @@ Future<void> main() async {
options: <String>[ options: <String>[
'apk', 'apk',
'--release', '--release',
'--target-platform=android-arm' '--target-platform=android-arm',
], ],
); );
}); });
@ -143,7 +143,7 @@ Future<void> main() async {
options: <String>[ options: <String>[
'apk', 'apk',
'--release', '--release',
'--target-platform=android-arm64' '--target-platform=android-arm64',
], ],
); );
}); });

View File

@ -55,7 +55,7 @@ Future<void> main() async {
if (!Platform.isWindows) { if (!Platform.isWindows) {
await exec('chmod', <String>[ await exec('chmod', <String>[
'444', '444',
readonlyTxtAssetFile.path readonlyTxtAssetFile.path,
]); ]);
} }

View File

@ -58,7 +58,7 @@ Future<void> main() async {
if (!Platform.isWindows) { if (!Platform.isWindows) {
await exec('chmod', <String>[ await exec('chmod', <String>[
'444', '444',
readonlyTxtAssetFile.path readonlyTxtAssetFile.path,
]); ]);
} }

View File

@ -425,7 +425,7 @@ end
'-archivePath', '-archivePath',
objectiveCBuildArchiveDirectory.path, objectiveCBuildArchiveDirectory.path,
'COMPILER_INDEX_STORE_ENABLE=NO', 'COMPILER_INDEX_STORE_ENABLE=NO',
'archive' 'archive',
], ],
environment: <String, String> { environment: <String, String> {
'FLUTTER_ANALYTICS_LOG_FILE': objectiveCAnalyticsOutputFile.path, 'FLUTTER_ANALYTICS_LOG_FILE': objectiveCAnalyticsOutputFile.path,

View File

@ -248,7 +248,7 @@ Future<void> main() async {
'build', 'build',
options: <String>[ options: <String>[
'ios', 'ios',
'--no-codesign' '--no-codesign',
], ],
// TODO(jmagman): Make Objective-C applications handle Swift libraries https://github.com/flutter/flutter/issues/16049 // TODO(jmagman): Make Objective-C applications handle Swift libraries https://github.com/flutter/flutter/issues/16049
canFail: true canFail: true
@ -272,7 +272,7 @@ Future<void> main() async {
'build', 'build',
options: <String>[ options: <String>[
'ios', 'ios',
'--no-codesign' '--no-codesign',
], ],
); );
}); });
@ -305,7 +305,7 @@ Future<void> main() async {
'build', 'build',
options: <String>[ options: <String>[
'ios', 'ios',
'--no-codesign' '--no-codesign',
], ],
); );
}); });
@ -326,7 +326,7 @@ Future<void> main() async {
'build', 'build',
options: <String>[ options: <String>[
'ios', 'ios',
'--no-codesign' '--no-codesign',
], ],
); );
}); });
@ -390,7 +390,7 @@ Future<void> main() async {
'build', 'build',
options: <String>[ options: <String>[
'ios', 'ios',
'--no-codesign' '--no-codesign',
], ],
); );
}); });

View File

@ -50,7 +50,7 @@ class ABTest {
final Map<String, dynamic> resultMap = results as Map<String, dynamic>; final Map<String, dynamic> resultMap = results as Map<String, dynamic>;
return <String, List<double>> { return <String, List<double>> {
for (String key in resultMap.keys) for (String key in resultMap.keys)
key: (resultMap[key] as List<dynamic>).cast<double>() key: (resultMap[key] as List<dynamic>).cast<double>(),
}; };
} }
@ -153,13 +153,13 @@ class ABTest {
'Score', 'Score',
'Average A', '(noise)', 'Average A', '(noise)',
'Average B', '(noise)', 'Average B', '(noise)',
'Speed-up' 'Speed-up',
]; ];
final List<FieldJustification> alignments = <FieldJustification>[ final List<FieldJustification> alignments = <FieldJustification>[
FieldJustification.LEFT, FieldJustification.LEFT,
FieldJustification.RIGHT, FieldJustification.LEFT, FieldJustification.RIGHT, FieldJustification.LEFT,
FieldJustification.RIGHT, FieldJustification.LEFT, FieldJustification.RIGHT, FieldJustification.LEFT,
FieldJustification.CENTER FieldJustification.CENTER,
]; ];
final List<int> lengths = List<int>.filled(6, 0); final List<int> lengths = List<int>.filled(6, 0);

View File

@ -131,7 +131,7 @@ class GalleryTransitionTest {
if (transitionDurationFile != null) if (transitionDurationFile != null)
'$testOutputDirectory/$transitionDurationFile.json', '$testOutputDirectory/$transitionDurationFile.json',
if (timelineTraceFile != null) if (timelineTraceFile != null)
'$testOutputDirectory/$timelineTraceFile.json' '$testOutputDirectory/$timelineTraceFile.json',
], ],
benchmarkScoreKeys: <String>[ benchmarkScoreKeys: <String>[
if (transitionDurationFile != null) if (transitionDurationFile != null)

View File

@ -29,7 +29,7 @@ TaskFunction runTask(adb.DeviceOperatingSystem operatingSystem) {
'ios,android', 'ios,android',
'--no-overwrite', '--no-overwrite',
'-v', '-v',
'.' '.',
]; ];
print('\nExecuting: $flutterExe $createArgs $appDir'); print('\nExecuting: $flutterExe $createArgs $appDir');
await utils.eval(flutterExe, createArgs); await utils.eval(flutterExe, createArgs);

View File

@ -82,7 +82,7 @@ void main() {
'device_type': 'Moto G Play', 'device_type': 'Moto G Play',
'device_version': 'android-25', 'device_version': 'android-25',
'host_type': 'linux', 'host_type': 'linux',
'host_version': 'debian-10.11' 'host_version': 'debian-10.11',
}; };
final List<MetricPoint> metricPoints = parse(results, tags, 'task abc'); final List<MetricPoint> metricPoints = parse(results, tags, 'task abc');

View File

@ -46,7 +46,7 @@ class _LifeCycleSpyState extends State<LifeCycleSpy> with WidgetsBindingObserver
super.initState(); super.initState();
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
_actualLifeCycleSequence = <AppLifecycleState?>[ _actualLifeCycleSequence = <AppLifecycleState?>[
ServicesBinding.instance.lifecycleState ServicesBinding.instance.lifecycleState,
]; ];
} }

View File

@ -91,7 +91,7 @@ class PlatformViewPage extends StatelessWidget {
key: button, key: button,
child: const Text('button'), child: const Text('button'),
onPressed: (){}, onPressed: (){},
) ),
], ],
), ),
); );

View File

@ -474,7 +474,7 @@ class Icon {
'_monoline_filled', '_monoline_filled',
'_outlined', '_outlined',
'_rounded', '_rounded',
'_sharp' '_sharp',
]; ];
late String id; // e.g. 5g, 5g_outlined, 5g_rounded, 5g_sharp late String id; // e.g. 5g, 5g_outlined, 5g_rounded, 5g_sharp

View File

@ -274,7 +274,7 @@ void main() {
<PathCommandAnimation>[ <PathCommandAnimation>[
PathCommandAnimation('M', <List<Point<double>>>[ PathCommandAnimation('M', <List<Point<double>>>[
<Point<double>>[Point<double>(5.0, 6.0)], <Point<double>>[Point<double>(5.0, 6.0)],
]) ]),
], ],
opacities: <double>[1.0], opacities: <double>[1.0],
)), )),

View File

@ -34,11 +34,11 @@ void main() {
<Map<String, dynamic>>[ <Map<String, dynamic>>[
<String, dynamic>{ <String, dynamic>{
'name': 'ImageCache.putIfAbsent', 'name': 'ImageCache.putIfAbsent',
'args': <String, dynamic>{'key': 'Test', 'isolateId': isolateId} 'args': <String, dynamic>{'key': 'Test', 'isolateId': isolateId},
}, },
<String, dynamic>{ <String, dynamic>{
'name': 'listener', 'name': 'listener',
'args': <String, dynamic>{'isolateId': isolateId} 'args': <String, dynamic>{'isolateId': isolateId},
}, },
<String, dynamic>{ <String, dynamic>{
'name': 'ImageCache.clear', 'name': 'ImageCache.clear',
@ -48,15 +48,15 @@ void main() {
'liveImages': 1, 'liveImages': 1,
'currentSizeInBytes': 0, 'currentSizeInBytes': 0,
'isolateId': isolateId, 'isolateId': isolateId,
} },
}, },
<String, dynamic>{ <String, dynamic>{
'name': 'ImageCache.putIfAbsent', 'name': 'ImageCache.putIfAbsent',
'args': <String, dynamic>{'key': 'Test2', 'isolateId': isolateId} 'args': <String, dynamic>{'key': 'Test2', 'isolateId': isolateId},
}, },
<String, dynamic>{ <String, dynamic>{
'name': 'ImageCache.evict', 'name': 'ImageCache.evict',
'args': <String, dynamic>{'sizeInBytes': 4, 'isolateId': isolateId} 'args': <String, dynamic>{'sizeInBytes': 4, 'isolateId': isolateId},
}, },
], ],
); );

View File

@ -59,7 +59,7 @@ class ActionSheetSample extends StatelessWidget {
Navigator.pop(context); Navigator.pop(context);
}, },
child: const Text('Destructive Action'), child: const Text('Destructive Action'),
) ),
], ],
), ),
); );

View File

@ -53,7 +53,7 @@ class ActionSheetSample extends StatelessWidget {
Navigator.pop(context); Navigator.pop(context);
}, },
child: const Text('Yes'), child: const Text('Yes'),
) ),
], ],
), ),
); );

View File

@ -54,7 +54,7 @@ class CupertinoNavBarSample extends StatelessWidget {
})); }));
}, },
child: const Text('Go to Next Page'), child: const Text('Go to Next Page'),
) ),
], ],
), ),
), ),

View File

@ -33,7 +33,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
List<Color> colors = <Color>[ List<Color> colors = <Color>[
CupertinoColors.systemYellow, CupertinoColors.systemYellow,
CupertinoColors.systemOrange, CupertinoColors.systemOrange,
CupertinoColors.systemPink CupertinoColors.systemPink,
]; ];
List<Widget> items = <Widget>[ List<Widget> items = <Widget>[
Container(color: CupertinoColors.systemPink, height: 100.0), Container(color: CupertinoColors.systemPink, height: 100.0),

View File

@ -41,7 +41,7 @@ class MyStatelessWidget extends StatelessWidget {
style: style, style: style,
onPressed: () {}, onPressed: () {},
child: const Text('Action 2'), child: const Text('Action 2'),
) ),
], ],
), ),
); );

View File

@ -49,7 +49,7 @@ class MyStatelessWidget extends StatelessWidget {
ElevatedButton( ElevatedButton(
child: const Text('Close BottomSheet'), child: const Text('Close BottomSheet'),
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
) ),
], ],
), ),
), ),

View File

@ -51,7 +51,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
}); });
}, },
), ),
Text('Volume : $_volume') Text('Volume : $_volume'),
], ],
); );
} }

View File

@ -140,7 +140,7 @@ class CustomListItemTwo extends StatelessWidget {
readDuration: readDuration, readDuration: readDuration,
), ),
), ),
) ),
], ],
), ),
), ),

View File

@ -267,7 +267,7 @@ class _HomeState extends State<Home> with TickerProviderStateMixin<Home> {
Destination(0, 'Teal', Icons.home, Colors.teal), Destination(0, 'Teal', Icons.home, Colors.teal),
Destination(1, 'Cyan', Icons.business, Colors.cyan), Destination(1, 'Cyan', Icons.business, Colors.cyan),
Destination(2, 'Orange', Icons.school, Colors.orange), Destination(2, 'Orange', Icons.school, Colors.orange),
Destination(3, 'Blue', Icons.flight, Colors.blue) Destination(3, 'Blue', Icons.flight, Colors.blue),
]; ];
late final List<GlobalKey<NavigatorState>> navigatorKeys; late final List<GlobalKey<NavigatorState>> navigatorKeys;

View File

@ -83,7 +83,7 @@ class _MyNavigationRailState extends State<MyNavigationRail> {
], ],
), ),
), ),
) ),
], ],
); );
} }

View File

@ -84,7 +84,7 @@ class _MyMenuBarAppState extends State<MyMenuBarApp> {
onSelected: () { onSelected: () {
_handleMenuSelection(MenuSelection.about); _handleMenuSelection(MenuSelection.about);
}, },
) ),
], ],
), ),
PlatformMenuItemGroup( PlatformMenuItemGroup(
@ -118,7 +118,7 @@ class _MyMenuBarAppState extends State<MyMenuBarApp> {
}, },
), ),
], ],
) ),
], ],
), ),
if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.quit)) if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.quit))

View File

@ -65,7 +65,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
value: Menu.itemFour, value: Menu.itemFour,
child: Text('Item 4'), child: Text('Item 4'),
), ),
]) ]),
], ],
), ),
body: Center( body: Center(

View File

@ -53,7 +53,7 @@ class MyScaffoldBody extends StatelessWidget {
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
}, },
) ),
], ],
), ),
), ),

View File

@ -53,7 +53,7 @@ class MyStatelessWidget extends StatelessWidget {
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
}, },
) ),
], ],
), ),
), ),

View File

@ -46,10 +46,11 @@ class MyStatelessWidget extends StatelessWidget {
children: <Widget>[ children: <Widget>[
const Text('BottomSheet'), const Text('BottomSheet'),
ElevatedButton( ElevatedButton(
child: const Text('Close BottomSheet'), child: const Text('Close BottomSheet'),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
}) },
),
], ],
), ),
), ),

View File

@ -34,7 +34,7 @@ class ExampleWidget extends StatelessWidget {
fontFamily: 'Sorts Mill Goudy', fontFamily: 'Sorts Mill Goudy',
fontFeatures: <FontFeature>[ fontFeatures: <FontFeature>[
FontFeature.historicalForms(), // Enables "hist". FontFeature.historicalForms(), // Enables "hist".
FontFeature.historicalLigatures() // Enables "hlig". FontFeature.historicalLigatures(), // Enables "hlig".
], ],
), ),
); );

View File

@ -54,7 +54,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Padding( Padding(
padding: const EdgeInsets.only(top: 16), padding: const EdgeInsets.only(top: 16),
child: Text('Result: ${snapshot.data}'), child: Text('Result: ${snapshot.data}'),
) ),
]; ];
} else if (snapshot.hasError) { } else if (snapshot.hasError) {
children = <Widget>[ children = <Widget>[
@ -66,7 +66,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Padding( Padding(
padding: const EdgeInsets.only(top: 16), padding: const EdgeInsets.only(top: 16),
child: Text('Error: ${snapshot.error}'), child: Text('Error: ${snapshot.error}'),
) ),
]; ];
} else { } else {
children = const <Widget>[ children = const <Widget>[
@ -78,7 +78,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Padding( Padding(
padding: EdgeInsets.only(top: 16), padding: EdgeInsets.only(top: 16),
child: Text('Awaiting result...'), child: Text('Awaiting result...'),
) ),
]; ];
} }
return Center( return Center(

View File

@ -85,7 +85,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Padding( Padding(
padding: EdgeInsets.only(top: 16), padding: EdgeInsets.only(top: 16),
child: Text('Select a lot'), child: Text('Select a lot'),
) ),
]; ];
break; break;
case ConnectionState.waiting: case ConnectionState.waiting:
@ -98,7 +98,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Padding( Padding(
padding: EdgeInsets.only(top: 16), padding: EdgeInsets.only(top: 16),
child: Text('Awaiting bids...'), child: Text('Awaiting bids...'),
) ),
]; ];
break; break;
case ConnectionState.active: case ConnectionState.active:
@ -111,7 +111,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Padding( Padding(
padding: const EdgeInsets.only(top: 16), padding: const EdgeInsets.only(top: 16),
child: Text('\$${snapshot.data}'), child: Text('\$${snapshot.data}'),
) ),
]; ];
break; break;
case ConnectionState.done: case ConnectionState.done:
@ -124,7 +124,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Padding( Padding(
padding: const EdgeInsets.only(top: 16), padding: const EdgeInsets.only(top: 16),
child: Text('\$${snapshot.data} (closed)'), child: Text('\$${snapshot.data} (closed)'),
) ),
]; ];
break; break;
} }

View File

@ -84,13 +84,13 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
TextField( TextField(
controller: billingAddress1, controller: billingAddress1,
autofillHints: const <String>[ autofillHints: const <String>[
AutofillHints.streetAddressLine1 AutofillHints.streetAddressLine1,
], ],
), ),
TextField( TextField(
controller: billingAddress2, controller: billingAddress2,
autofillHints: const <String>[ autofillHints: const <String>[
AutofillHints.streetAddressLine2 AutofillHints.streetAddressLine2,
], ],
), ),
], ],
@ -109,7 +109,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
TextField( TextField(
controller: creditCardSecurityCode, controller: creditCardSecurityCode,
autofillHints: const <String>[ autofillHints: const <String>[
AutofillHints.creditCardSecurityCode AutofillHints.creditCardSecurityCode,
], ],
), ),
], ],

View File

@ -43,7 +43,7 @@ class _IVBuilderExampleState extends State<_IVBuilderExample> {
for (final Vector3 point in <Vector3>[ for (final Vector3 point in <Vector3>[
quad.point1, quad.point1,
quad.point2, quad.point2,
quad.point3 quad.point3,
]) { ]) {
if (point.x < xMin) { if (point.x < xMin) {
xMin = point.x; xMin = point.x;

View File

@ -40,7 +40,7 @@ class MyStatelessWidget extends StatelessWidget {
expandedHeight: 200.0, expandedHeight: 200.0,
forceElevated: innerBoxIsScrolled, forceElevated: innerBoxIsScrolled,
), ),
) ),
]; ];
}, body: Builder(builder: (BuildContext context) { }, body: Builder(builder: (BuildContext context) {
return CustomScrollView( return CustomScrollView(

View File

@ -33,7 +33,7 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
ColorBoxPage( ColorBoxPage(
key: PageStorageKey<String>('pageTwo'), key: PageStorageKey<String>('pageTwo'),
) ),
]; ];
int currentTab = 0; int currentTab = 0;
final PageStorageBucket _bucket = PageStorageBucket(); final PageStorageBucket _bucket = PageStorageBucket();

View File

@ -44,7 +44,7 @@ class MyStatelessWidget extends StatelessWidget {
), ),
Center( Center(
child: Text('Third Page'), child: Text('Third Page'),
) ),
], ],
); );
} }

View File

@ -43,7 +43,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
blurRadius: 10.0, blurRadius: 10.0,
spreadRadius: 3.0, spreadRadius: 3.0,
offset: Offset(0, 6.0), offset: Offset(0, 6.0),
) ),
], ],
), ),
end: BoxDecoration( end: BoxDecoration(

View File

@ -80,7 +80,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
childCount: 5, childCount: 5,
), ),
), ),
) ),
]); ]);
} }
} }

View File

@ -1907,7 +1907,7 @@ class ThemeData with Diagnosticable {
static Map<Object, ThemeExtension<dynamic>> _themeExtensionIterableToMap(Iterable<ThemeExtension<dynamic>> extensionsIterable) { static Map<Object, ThemeExtension<dynamic>> _themeExtensionIterableToMap(Iterable<ThemeExtension<dynamic>> extensionsIterable) {
return Map<Object, ThemeExtension<dynamic>>.unmodifiable(<Object, ThemeExtension<dynamic>>{ return Map<Object, ThemeExtension<dynamic>>.unmodifiable(<Object, ThemeExtension<dynamic>>{
// Strangely, the cast is necessary for tests to run. // Strangely, the cast is necessary for tests to run.
for (final ThemeExtension<dynamic> extension in extensionsIterable) extension.type: extension as ThemeExtension<ThemeExtension<dynamic>> for (final ThemeExtension<dynamic> extension in extensionsIterable) extension.type: extension as ThemeExtension<ThemeExtension<dynamic>>,
}); });
} }

View File

@ -1076,9 +1076,9 @@ void main() {
height: 1000.0, height: 1000.0,
width: 1000.0, width: 1000.0,
child: Text('Test'), child: Text('Test'),
) ),
] ],
) ),
)); ));
expect(find.byType(StretchingOverscrollIndicator), findsNothing); expect(find.byType(StretchingOverscrollIndicator), findsNothing);
@ -1094,9 +1094,9 @@ void main() {
height: 1000.0, height: 1000.0,
width: 1000.0, width: 1000.0,
child: Text('Test'), child: Text('Test'),
) ),
] ],
) ),
)); ));
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget); expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);
@ -1106,15 +1106,15 @@ void main() {
testWidgets('ScrollBehavior stretch android overscroll indicator via useMaterial3 flag', (WidgetTester tester) async { testWidgets('ScrollBehavior stretch android overscroll indicator via useMaterial3 flag', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
theme: ThemeData(useMaterial3: true), theme: ThemeData(useMaterial3: true),
home: ListView( home: ListView(
children: const <Widget>[ children: const <Widget>[
SizedBox( SizedBox(
height: 1000.0, height: 1000.0,
width: 1000.0, width: 1000.0,
child: Text('Test'), child: Text('Test'),
) ),
] ],
) ),
)); ));
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget); expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);
@ -1131,9 +1131,9 @@ void main() {
height: 1000.0, height: 1000.0,
width: 1000.0, width: 1000.0,
child: Text('Test'), child: Text('Test'),
) ),
] ],
) ),
)); ));
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget); expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);
@ -1151,9 +1151,9 @@ void main() {
height: 1000.0, height: 1000.0,
width: 1000.0, width: 1000.0,
child: Text('Test'), child: Text('Test'),
) ),
] ],
) ),
)); ));
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget); expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);

View File

@ -3322,7 +3322,7 @@ void main() {
alignment: buttonAlignment ?? AlignmentDirectional.centerStart, alignment: buttonAlignment ?? AlignmentDirectional.centerStart,
value: 'enabled', value: 'enabled',
child: const Text('enabled'), child: const Text('enabled'),
) ),
], ],
), ),
), ),
@ -3573,7 +3573,7 @@ void main() {
value, value,
'Two', 'Two',
'Free', 'Free',
'Four' 'Four',
].map<DropdownMenuItem<String>>((String value) { ].map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>( return DropdownMenuItem<String>(
value: value, value: value,

View File

@ -869,8 +869,8 @@ void main() {
bounds: Rect.fromLTRB(390, 0, 410, 600), bounds: Rect.fromLTRB(390, 0, 410, 600),
type: DisplayFeatureType.cutout, type: DisplayFeatureType.cutout,
state: DisplayFeatureState.unknown, state: DisplayFeatureState.unknown,
) ),
] ],
), ),
child: Scaffold( child: Scaffold(
body: Navigator( body: Navigator(
@ -2215,20 +2215,22 @@ void main() {
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text('PopupMenu Test'), title: const Text('PopupMenu Test'),
actions: <Widget>[PopupMenuButton<int>( actions: <Widget>[
child: SizedBox( PopupMenuButton<int>(
key: buttonKey, child: SizedBox(
height: height, key: buttonKey,
width: width, height: height,
child: const ColoredBox( width: width,
color: Colors.pink, child: const ColoredBox(
color: Colors.pink,
),
), ),
itemBuilder: (BuildContext context) => <PopupMenuEntry<int>>[
const PopupMenuItem<int>(value: 1, child: Text('-1-')),
const PopupMenuItem<int>(value: 2, child: Text('-2-')),
],
), ),
itemBuilder: (BuildContext context) => <PopupMenuEntry<int>>[ ],
const PopupMenuItem<int>(value: 1, child: Text('-1-')),
const PopupMenuItem<int>(value: 2, child: Text('-2-')),
],
)],
), ),
body: Container(), body: Container(),
), ),
@ -2269,30 +2271,32 @@ void main() {
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text('PopupMenu Test'), title: const Text('PopupMenu Test'),
actions: <Widget>[PopupMenuButton<int>( actions: <Widget>[
child: SizedBox( PopupMenuButton<int>(
key: buttonKey, child: SizedBox(
height: height, key: buttonKey,
width: width, height: height,
child: const ColoredBox( width: width,
color: Colors.pink, child: const ColoredBox(
), color: Colors.pink,
),
itemBuilder: (BuildContext context) {
return <PopupMenuEntry<int>>[
PopupMenuItem<int>(
value: 1,
child: Builder(
builder: (BuildContext context) {
mediaQueryPadding = MediaQuery.of(context).padding;
return Text('-1-' * 500); // A long long text string.
},
),
), ),
const PopupMenuItem<int>(value: 2, child: Text('-2-')), ),
]; itemBuilder: (BuildContext context) {
}, return <PopupMenuEntry<int>>[
)], PopupMenuItem<int>(
value: 1,
child: Builder(
builder: (BuildContext context) {
mediaQueryPadding = MediaQuery.of(context).padding;
return Text('-1-' * 500); // A long long text string.
},
),
),
const PopupMenuItem<int>(value: 2, child: Text('-2-')),
];
},
),
],
), ),
body: const SizedBox.shrink(), body: const SizedBox.shrink(),
), ),
@ -2570,7 +2574,7 @@ void main() {
splashRadius: splashRadius, splashRadius: splashRadius,
child: const Text('An item'), child: const Text('An item'),
itemBuilder: (_) => <PopupMenuEntry<String>>[ itemBuilder: (_) => <PopupMenuEntry<String>>[
const PopupMenuDivider() const PopupMenuDivider(),
], ],
), ),
), ),

View File

@ -662,7 +662,7 @@ void main() {
"trackBorderColor: Instance of '_MaterialStatePropertyWith<Color?>'", "trackBorderColor: Instance of '_MaterialStatePropertyWith<Color?>'",
'crossAxisMargin: 3.0', 'crossAxisMargin: 3.0',
'mainAxisMargin: 6.0', 'mainAxisMargin: 6.0',
'minThumbLength: 120.0' 'minThumbLength: 120.0',
]); ]);
// On the web, Dart doubles and ints are backed by the same kind of object because // On the web, Dart doubles and ints are backed by the same kind of object because

View File

@ -90,7 +90,7 @@ void main() {
"rangeValueIndicatorShape: Instance of 'PaddleRangeSliderValueIndicatorShape'", "rangeValueIndicatorShape: Instance of 'PaddleRangeSliderValueIndicatorShape'",
'showValueIndicator: always', 'showValueIndicator: always',
'valueIndicatorTextStyle: TextStyle(inherit: true, color: Color(0xff000000))', 'valueIndicatorTextStyle: TextStyle(inherit: true, color: Color(0xff000000))',
'mouseCursor: MaterialStateMouseCursor(clickable)' 'mouseCursor: MaterialStateMouseCursor(clickable)',
]); ]);
}); });

View File

@ -447,7 +447,7 @@ void main() {
), ),
MyThemeExtensionB( MyThemeExtensionB(
textStyle: TextStyle(fontSize: 50), textStyle: TextStyle(fontSize: 50),
) ),
}, },
), ),
home: Container(key: containerKey), home: Container(key: containerKey),

View File

@ -1144,7 +1144,7 @@ void main() {
waitDuration: waitDuration, waitDuration: waitDuration,
showDuration: Duration(days: 1), showDuration: Duration(days: 1),
child: Text('tooltip2'), child: Text('tooltip2'),
) ),
], ],
), ),
), ),

View File

@ -410,7 +410,7 @@ void main() {
child: const Text('anchor'), child: const Text('anchor'),
); );
}, },
) ),
]; ];
Widget _buildNavigator(Key? key, List<Page<dynamic>> pages) { Widget _buildNavigator(Key? key, List<Page<dynamic>> pages) {

View File

@ -33,7 +33,7 @@ void runTests() {
const Map<String, String> headers = <String, String>{ const Map<String, String> headers = <String, String>{
'flutter': 'flutter', 'flutter': 'flutter',
'second': 'second' 'second': 'second',
}; };
final Image image = Image.network( final Image image = Image.network(
@ -60,7 +60,7 @@ void runTests() {
const Map<String, String> headers = <String, String>{ const Map<String, String> headers = <String, String>{
'flutter': 'flutter', 'flutter': 'flutter',
'second': 'second' 'second': 'second',
}; };
final Image image = Image.network( final Image image = Image.network(
@ -87,7 +87,7 @@ void runTests() {
const Map<String, String> headers = <String, String>{ const Map<String, String> headers = <String, String>{
'flutter': 'flutter', 'flutter': 'flutter',
'second': 'second' 'second': 'second',
}; };
final Image image = Image.network( final Image image = Image.network(

View File

@ -140,15 +140,17 @@ void main() {
}); });
test('Flutter.Frame event fired', () async { test('Flutter.Frame event fired', () async {
SchedulerBinding.instance.platformDispatcher.onReportTimings!(<FrameTiming>[FrameTiming( SchedulerBinding.instance.platformDispatcher.onReportTimings!(<FrameTiming>[
vsyncStart: 5000, FrameTiming(
buildStart: 10000, vsyncStart: 5000,
buildFinish: 15000, buildStart: 10000,
rasterStart: 16000, buildFinish: 15000,
rasterFinish: 20000, rasterStart: 16000,
rasterFinishWallTime: 20010, rasterFinish: 20000,
frameNumber: 1991 rasterFinishWallTime: 20010,
)]); frameNumber: 1991,
),
]);
final List<Map<String, dynamic>> events = scheduler.getEventsDispatched('Flutter.Frame'); final List<Map<String, dynamic>> events = scheduler.getEventsDispatched('Flutter.Frame');
expect(events, hasLength(1)); expect(events, hasLength(1));

View File

@ -34,7 +34,7 @@ void main() {
'statusBarBrightness': 'Brightness.dark', 'statusBarBrightness': 'Brightness.dark',
'statusBarIconBrightness': 'Brightness.light', 'statusBarIconBrightness': 'Brightness.light',
'systemNavigationBarIconBrightness': 'Brightness.light', 'systemNavigationBarIconBrightness': 'Brightness.light',
'systemNavigationBarContrastEnforced': null 'systemNavigationBarContrastEnforced': null,
}, },
)); ));
log.clear(); log.clear();
@ -47,7 +47,7 @@ void main() {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
systemStatusBarContrastEnforced: false, systemStatusBarContrastEnforced: false,
systemNavigationBarContrastEnforced: true systemNavigationBarContrastEnforced: true,
)); ));
expect(tester.binding.microtaskCount, equals(1)); expect(tester.binding.microtaskCount, equals(1));
await tester.idle(); await tester.idle();
@ -62,7 +62,7 @@ void main() {
'statusBarBrightness': null, 'statusBarBrightness': null,
'statusBarIconBrightness': null, 'statusBarIconBrightness': null,
'systemNavigationBarIconBrightness': null, 'systemNavigationBarIconBrightness': null,
'systemNavigationBarContrastEnforced': true 'systemNavigationBarContrastEnforced': true,
}, },
)); ));
}); });

View File

@ -1470,7 +1470,7 @@ void main() {
setState = stateSetter; setState = stateSetter;
return Actions( return Actions(
actions: <Type, Action<Intent>> { actions: <Type, Action<Intent>> {
if (action2LookupContext != null) LogIntent: Action<LogIntent>.overridable(defaultAction: LogInvocationAction(actionName: 'action2'), context: action2LookupContext!) if (action2LookupContext != null) LogIntent: Action<LogIntent>.overridable(defaultAction: LogInvocationAction(actionName: 'action2'), context: action2LookupContext!),
}, },
child: Builder( child: Builder(
builder: (BuildContext context3) { builder: (BuildContext context3) {
@ -1579,7 +1579,7 @@ void main() {
context: context2, context: context2,
), ),
context: context3, context: context3,
) ),
}, },
child: Builder( child: Builder(
builder: (BuildContext context4) { builder: (BuildContext context4) {

View File

@ -389,7 +389,7 @@ void main() {
const SizedBox( const SizedBox(
key: key2, key: key2,
height: 200, height: 200,
) ),
], ],
), ),
) )
@ -416,10 +416,10 @@ void main() {
key: key2, key: key2,
height: 200, height: 200,
child: animatedSize, child: animatedSize,
) ),
], ],
), ),
) ),
); );
expect( expect(

View File

@ -1016,7 +1016,7 @@ void main() {
_boilerplate( _boilerplate(
null, null,
controller: controller, controller: controller,
) ),
], ],
), ),
), null, EnginePhase.build); ), null, EnginePhase.build);

View File

@ -60,10 +60,12 @@ void main() {
int frame = 1; int frame = 1;
await tester.pumpWidget(SizeChanger( // when this is triggered, the child LayoutBuilder will build again await tester.pumpWidget(SizeChanger( // when this is triggered, the child LayoutBuilder will build again
child: LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) { child: LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
return Column(children: <Widget>[Expanded( return Column(children: <Widget>[
flex: frame, // this is different after the next pump, so that the parentData has to be applied again Expanded(
child: Container(height: 100.0), flex: frame, // this is different after the next pump, so that the parentData has to be applied again
)]); child: Container(height: 100.0),
),
]);
}), }),
)); ));
frame += 1; frame += 1;

View File

@ -368,11 +368,11 @@ void main() {
color: const Color(0xD0FF0000), color: const Color(0xD0FF0000),
height: 100, height: 100,
), ),
) ),
], ],
) ),
), ),
) ),
)); ));
expect(find.text('Index 1'), findsOneWidget); expect(find.text('Index 1'), findsOneWidget);
@ -396,41 +396,43 @@ void main() {
testWidgets('Clip behavior is updated as needed', (WidgetTester tester) async { testWidgets('Clip behavior is updated as needed', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/97867 // Regression test for https://github.com/flutter/flutter/issues/97867
await tester.pumpWidget(Directionality( await tester.pumpWidget(
Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: MediaQuery( child: MediaQuery(
data: const MediaQueryData(size: Size(800.0, 600.0)), data: const MediaQueryData(size: Size(800.0, 600.0)),
child: ScrollConfiguration( child: ScrollConfiguration(
behavior: const ScrollBehavior().copyWith(overscroll: false), behavior: const ScrollBehavior().copyWith(overscroll: false),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
StretchingOverscrollIndicator( StretchingOverscrollIndicator(
axisDirection: AxisDirection.down, axisDirection: AxisDirection.down,
child: SizedBox( child: SizedBox(
height: 300, height: 300,
child: ListView.builder( child: ListView.builder(
itemCount: 20, itemCount: 20,
itemBuilder: (BuildContext context, int index){ itemBuilder: (BuildContext context, int index){
return Padding( return Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child: Text('Index $index'), child: Text('Index $index'),
); );
}, },
),
), ),
), ),
Opacity( ),
opacity: 0.5, Opacity(
child: Container( opacity: 0.5,
color: const Color(0xD0FF0000), child: Container(
height: 100, color: const Color(0xD0FF0000),
), height: 100,
) ),
], ),
) ],
),
), ),
) ),
)); ),
);
expect(find.text('Index 1'), findsOneWidget); expect(find.text('Index 1'), findsOneWidget);
expect(tester.getCenter(find.text('Index 1')).dy, 51.0); expect(tester.getCenter(find.text('Index 1')).dy, 51.0);

View File

@ -131,15 +131,15 @@ void main() {
'enabled': true, 'enabled': true,
'shortcutTrigger': 100, 'shortcutTrigger': 100,
'shortcutModifiers': 1, 'shortcutModifiers': 1,
} },
] ],
}, },
<String, Object?>{ <String, Object?>{
'id': 17, 'id': 17,
'label': 'Sub Menu 12', 'label': 'Sub Menu 12',
'enabled': true, 'enabled': true,
} },
] ],
}, },
<String, Object?>{ <String, Object?>{
'id': 20, 'id': 20,
@ -153,8 +153,8 @@ void main() {
}, },
], ],
}, },
<String, Object?>{'id': 21, 'label': 'Menu 3', 'enabled': false, 'children': <Map<String, Object?>>[]} <String, Object?>{'id': 21, 'label': 'Menu 3', 'enabled': false, 'children': <Map<String, Object?>>[]},
] ],
}), }),
); );
}); });

View File

@ -82,7 +82,8 @@ void main() {
}); });
testWidgets('ScrollBehavior default android overscroll indicator', (WidgetTester tester) async { testWidgets('ScrollBehavior default android overscroll indicator', (WidgetTester tester) async {
await tester.pumpWidget(Directionality( await tester.pumpWidget(
Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: ScrollConfiguration( child: ScrollConfiguration(
behavior: const ScrollBehavior(), behavior: const ScrollBehavior(),
@ -92,35 +93,38 @@ void main() {
height: 1000.0, height: 1000.0,
width: 1000.0, width: 1000.0,
child: Text('Test'), child: Text('Test'),
) ),
] ],
) ),
), ),
)); ),
);
expect(find.byType(StretchingOverscrollIndicator), findsNothing); expect(find.byType(StretchingOverscrollIndicator), findsNothing);
expect(find.byType(GlowingOverscrollIndicator), findsOneWidget); expect(find.byType(GlowingOverscrollIndicator), findsOneWidget);
}, variant: TargetPlatformVariant.only(TargetPlatform.android)); }, variant: TargetPlatformVariant.only(TargetPlatform.android));
testWidgets('ScrollBehavior stretch android overscroll indicator', (WidgetTester tester) async { testWidgets('ScrollBehavior stretch android overscroll indicator', (WidgetTester tester) async {
await tester.pumpWidget(Directionality( await tester.pumpWidget(
textDirection: TextDirection.ltr, Directionality(
child: MediaQuery( textDirection: TextDirection.ltr,
data: const MediaQueryData(size: Size(800, 600)), child: MediaQuery(
child: ScrollConfiguration( data: const MediaQueryData(size: Size(800, 600)),
child: ScrollConfiguration(
behavior: const ScrollBehavior(androidOverscrollIndicator: AndroidOverscrollIndicator.stretch), behavior: const ScrollBehavior(androidOverscrollIndicator: AndroidOverscrollIndicator.stretch),
child: ListView( child: ListView(
children: const <Widget>[ children: const <Widget>[
SizedBox( SizedBox(
height: 1000.0, height: 1000.0,
width: 1000.0, width: 1000.0,
child: Text('Test'), child: Text('Test'),
) ),
] ],
) ),
),
), ),
), ),
)); );
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget); expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);
expect(find.byType(GlowingOverscrollIndicator), findsNothing); expect(find.byType(GlowingOverscrollIndicator), findsNothing);

View File

@ -402,12 +402,14 @@ void main() {
MaterialApp( MaterialApp(
home: CustomScrollView( home: CustomScrollView(
physics: canDrag ? const AlwaysScrollableScrollPhysics() : const NeverScrollableScrollPhysics(), physics: canDrag ? const AlwaysScrollableScrollPhysics() : const NeverScrollableScrollPhysics(),
slivers: <Widget>[SliverToBoxAdapter( slivers: <Widget>[
child: SizedBox( SliverToBoxAdapter(
height: 2000, child: SizedBox(
child: GestureDetector(onTap: () {}), height: 2000,
child: GestureDetector(onTap: () {}),
),
), ),
)], ],
), ),
), ),
); );

View File

@ -2197,7 +2197,7 @@ void main() {
actions: <SemanticsAction>[SemanticsAction.longPress], actions: <SemanticsAction>[SemanticsAction.longPress],
label: 'German greeting for good day', label: 'German greeting for good day',
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
) ),
], ],
), ignoreTransform: true, ignoreRect: true)); ), ignoreTransform: true, ignoreRect: true));
}); });
@ -2398,7 +2398,7 @@ void main() {
TestSemantics( TestSemantics(
flags: <SemanticsFlag>[ flags: <SemanticsFlag>[
SemanticsFlag.isHidden, SemanticsFlag.isHidden,
SemanticsFlag.isLink SemanticsFlag.isLink,
], ],
actions: <SemanticsAction>[SemanticsAction.tap], actions: <SemanticsAction>[SemanticsAction.tap],
label: 'off screen', label: 'off screen',

View File

@ -411,8 +411,8 @@ void main() {
1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0,
25.0, 25.0, 0.0, 1.0] 25.0, 25.0, 0.0, 1.0,
); ]);
}); });
testWidgets('Transform.scale with FilterQuality produces filter layer', (WidgetTester tester) async { testWidgets('Transform.scale with FilterQuality produces filter layer', (WidgetTester tester) async {
@ -429,8 +429,8 @@ void main() {
3.14159, 0.0, 0.0, 0.0, 3.14159, 0.0, 0.0, 0.0,
0.0, 3.14159, 0.0, 0.0, 0.0, 3.14159, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0,
-856.636, -642.477, 0.0, 1.0] -856.636, -642.477, 0.0, 1.0,
); ]);
}); });
testWidgets('Transform.rotate with FilterQuality produces filter layer', (WidgetTester tester) async { testWidgets('Transform.rotate with FilterQuality produces filter layer', (WidgetTester tester) async {
@ -447,8 +447,8 @@ void main() {
moreOrLessEquals(0.7071067811865476), moreOrLessEquals(0.7071067811865475), 0.0, 0.0, moreOrLessEquals(0.7071067811865476), moreOrLessEquals(0.7071067811865475), 0.0, 0.0,
moreOrLessEquals(-0.7071067811865475), moreOrLessEquals(0.7071067811865476), 0.0, 0.0, moreOrLessEquals(-0.7071067811865475), moreOrLessEquals(0.7071067811865476), 0.0, 0.0,
0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0,
moreOrLessEquals(329.28932188134524), moreOrLessEquals(-194.97474683058329), 0.0, 1.0] moreOrLessEquals(329.28932188134524), moreOrLessEquals(-194.97474683058329), 0.0, 1.0,
); ]);
}); });
testWidgets('Offset Transform.rotate with FilterQuality produces filter layer', (WidgetTester tester) async { testWidgets('Offset Transform.rotate with FilterQuality produces filter layer', (WidgetTester tester) async {
@ -469,8 +469,8 @@ void main() {
moreOrLessEquals(0.7071067811865476), moreOrLessEquals(0.7071067811865475), 0.0, 0.0, moreOrLessEquals(0.7071067811865476), moreOrLessEquals(0.7071067811865475), 0.0, 0.0,
moreOrLessEquals(-0.7071067811865475), moreOrLessEquals(0.7071067811865476), 0.0, 0.0, moreOrLessEquals(-0.7071067811865475), moreOrLessEquals(0.7071067811865476), 0.0, 0.0,
0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0,
moreOrLessEquals(329.28932188134524), moreOrLessEquals(-194.97474683058329), 0.0, 1.0] moreOrLessEquals(329.28932188134524), moreOrLessEquals(-194.97474683058329), 0.0, 1.0,
); ]);
}); });
testWidgets('Transform layers update to match child and filterQuality', (WidgetTester tester) async { testWidgets('Transform layers update to match child and filterQuality', (WidgetTester tester) async {

View File

@ -25,11 +25,13 @@ void main() {
width: 4.0, width: 4.0,
), ),
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
boxShadow: const <BoxShadow> [BoxShadow( boxShadow: const <BoxShadow>[
color: Color(0x66000000), BoxShadow(
blurRadius: 10.0, color: Color(0x66000000),
spreadRadius: 4.0, blurRadius: 10.0,
)], spreadRadius: 4.0,
),
],
), ),
end: BoxDecoration( end: BoxDecoration(
color: const Color(0xFF000000), color: const Color(0xFF000000),

View File

@ -65,7 +65,7 @@ abstract class SerializableWaitCondition {
/// Serializes the object to JSON. /// Serializes the object to JSON.
Map<String, String> serialize() { Map<String, String> serialize() {
return <String, String>{ return <String, String>{
'conditionName': conditionName 'conditionName': conditionName,
}; };
} }

View File

@ -1154,9 +1154,8 @@ void main() {
height: 0, height: 0,
width: 0, width: 0,
child: Text('World!', key: Key('widgetTwo')), child: Text('World!', key: Key('widgetTwo')),
) ),
], ]),
),
), ),
); );

View File

@ -108,7 +108,7 @@ void main() {
await driver.waitFor(find.byTooltip('foo'), timeout: _kTestTimeout); await driver.waitFor(find.byTooltip('foo'), timeout: _kTestTimeout);
expect(log, <String>[ expect(log, <String>[
'VMServiceFlutterDriver: >>> {command: waitFor, timeout: $_kSerializedTestTimeout, finderType: ByTooltipMessage, text: foo}', 'VMServiceFlutterDriver: >>> {command: waitFor, timeout: $_kSerializedTestTimeout, finderType: ByTooltipMessage, text: foo}',
'VMServiceFlutterDriver: <<< {isError: false, response: {status: ok}}' 'VMServiceFlutterDriver: <<< {isError: false, response: {status: ok}}',
]); ]);
}); });
@ -587,7 +587,7 @@ void main() {
'setVMTimelineFlags [Dart, GC, Compiler]', 'setVMTimelineFlags [Dart, GC, Compiler]',
'getFlagList', 'getFlagList',
'setVMTimelineFlags []', 'setVMTimelineFlags []',
'getVMTimeline null null' 'getVMTimeline null null',
]); ]);
expect(timeline.events!.single.name, 'test event'); expect(timeline.events!.single.name, 'test event');
@ -679,7 +679,7 @@ void main() {
expect(fakeClient.commandLog, <String>[ expect(fakeClient.commandLog, <String>[
'ext.flutter.driver {command: set_frame_sync, enabled: false}', 'ext.flutter.driver {command: set_frame_sync, enabled: false}',
'ext.flutter.driver {command: waitFor, timeout: $_kSerializedTestTimeout, finderType: ByTooltipMessage, text: foo}', 'ext.flutter.driver {command: waitFor, timeout: $_kSerializedTestTimeout, finderType: ByTooltipMessage, text: foo}',
'ext.flutter.driver {command: set_frame_sync, enabled: true}' 'ext.flutter.driver {command: set_frame_sync, enabled: true}',
]); ]);
}); });
}); });

View File

@ -53,8 +53,8 @@ void main() {
'ph': 'b', 'ph': 'b',
'ts': timeStamp, 'ts': timeStamp,
'args': <String, String>{ 'args': <String, String>{
'vsync_transitions_missed': vsyncsMissed.toString() 'vsync_transitions_missed': vsyncsMissed.toString(),
} },
}; };
Map<String, dynamic> lagEnd(int timeStamp, int vsyncsMissed) => <String, dynamic>{ Map<String, dynamic> lagEnd(int timeStamp, int vsyncsMissed) => <String, dynamic>{
@ -62,8 +62,8 @@ void main() {
'ph': 'e', 'ph': 'e',
'ts': timeStamp, 'ts': timeStamp,
'args': <String, String>{ 'args': <String, String>{
'vsync_transitions_missed': vsyncsMissed.toString() 'vsync_transitions_missed': vsyncsMissed.toString(),
} },
}; };
Map<String, dynamic> cpuUsage(int timeStamp, double cpuUsage) => <String, dynamic>{ Map<String, dynamic> cpuUsage(int timeStamp, double cpuUsage) => <String, dynamic>{
@ -71,8 +71,8 @@ void main() {
'name': 'CpuUsage', 'name': 'CpuUsage',
'ts': timeStamp, 'ts': timeStamp,
'args': <String, String>{ 'args': <String, String>{
'total_cpu_usage': cpuUsage.toString() 'total_cpu_usage': cpuUsage.toString(),
} },
}; };
Map<String, dynamic> memoryUsage(int timeStamp, double dirty, double shared) => <String, dynamic>{ Map<String, dynamic> memoryUsage(int timeStamp, double dirty, double shared) => <String, dynamic>{
@ -82,7 +82,7 @@ void main() {
'args': <String, String>{ 'args': <String, String>{
'owned_shared_memory_usage': shared.toString(), 'owned_shared_memory_usage': shared.toString(),
'dirty_memory_usage': dirty.toString(), 'dirty_memory_usage': dirty.toString(),
} },
}; };
Map<String, dynamic> platformVsync(int timeStamp) => <String, dynamic>{ Map<String, dynamic> platformVsync(int timeStamp) => <String, dynamic>{
@ -98,7 +98,7 @@ void main() {
'args': <String, dynamic>{ 'args': <String, dynamic>{
'StartTime': startTime, 'StartTime': startTime,
'TargetTime': endTime, 'TargetTime': endTime,
} },
}; };
List<Map<String, dynamic>> _genGC(String name, int count, int startTime, int timeDiff) { List<Map<String, dynamic>> _genGC(String name, int count, int startTime, int timeDiff) {

View File

@ -135,7 +135,7 @@ void main() {
const CombinedCondition combinedCondition = const CombinedCondition combinedCondition =
CombinedCondition(<SerializableWaitCondition>[ CombinedCondition(<SerializableWaitCondition>[
NoTransientCallbacks(), NoTransientCallbacks(),
NoPendingFrame() NoPendingFrame(),
]); ]);
expect(combinedCondition.serialize(), <String, String>{ expect(combinedCondition.serialize(), <String, String>{

View File

@ -22,11 +22,12 @@ import 'json_templates.dart';
const String _kFlutterRoot = '/flutter'; const String _kFlutterRoot = '/flutter';
// 1x1 transparent pixel // 1x1 transparent pixel
const List<int> _kTestPngBytes = const List<int> _kTestPngBytes = <int>[
<int>[137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0,
1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0, 0, 0, 11, 73, 68, 65, 84, 1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0, 0, 0, 11, 73, 68, 65, 84,
120, 1, 99, 97, 0, 2, 0, 0, 25, 0, 5, 144, 240, 54, 245, 0, 0, 0, 0, 73, 69, 120, 1, 99, 97, 0, 2, 0, 0, 25, 0, 5, 144, 240, 54, 245, 0, 0, 0, 0, 73, 69,
78, 68, 174, 66, 96, 130]; 78, 68, 174, 66, 96, 130,
];
void main() { void main() {
late MemoryFileSystem fs; late MemoryFileSystem fs;
@ -547,7 +548,7 @@ void main() {
'SWARMING_TASK_ID' : '12345678990', 'SWARMING_TASK_ID' : '12345678990',
'GOLDCTL' : 'goldctl', 'GOLDCTL' : 'goldctl',
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform), FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform),
@ -561,7 +562,7 @@ void main() {
'FLUTTER_ROOT': _kFlutterRoot, 'FLUTTER_ROOT': _kFlutterRoot,
'SWARMING_TASK_ID' : '12345678990', 'SWARMING_TASK_ID' : '12345678990',
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform), FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform),
@ -575,9 +576,9 @@ void main() {
'FLUTTER_ROOT': _kFlutterRoot, 'FLUTTER_ROOT': _kFlutterRoot,
'SWARMING_TASK_ID' : '12345678990', 'SWARMING_TASK_ID' : '12345678990',
'GOLDCTL' : 'goldctl', 'GOLDCTL' : 'goldctl',
'GOLD_TRYJOB' : 'git/ref/12345/head' 'GOLD_TRYJOB' : 'git/ref/12345/head',
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform), FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform),
@ -592,9 +593,9 @@ void main() {
'CIRRUS_CI': 'true', 'CIRRUS_CI': 'true',
'CIRRUS_PR': '', 'CIRRUS_PR': '',
'CIRRUS_BRANCH': 'master', 'CIRRUS_BRANCH': 'master',
'GOLD_SERVICE_ACCOUNT': 'service account...' 'GOLD_SERVICE_ACCOUNT': 'service account...',
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform), FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform),
@ -664,9 +665,9 @@ void main() {
'FLUTTER_ROOT': _kFlutterRoot, 'FLUTTER_ROOT': _kFlutterRoot,
'SWARMING_TASK_ID' : '12345678990', 'SWARMING_TASK_ID' : '12345678990',
'GOLDCTL' : 'goldctl', 'GOLDCTL' : 'goldctl',
'GOLD_TRYJOB' : 'git/ref/12345/head' 'GOLD_TRYJOB' : 'git/ref/12345/head',
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterPreSubmitFileComparator.isAvailableForEnvironment(platform), FlutterPreSubmitFileComparator.isAvailableForEnvironment(platform),
@ -679,7 +680,7 @@ void main() {
environment: <String, String>{ environment: <String, String>{
'FLUTTER_ROOT': _kFlutterRoot, 'FLUTTER_ROOT': _kFlutterRoot,
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterPreSubmitFileComparator.isAvailableForEnvironment(platform), FlutterPreSubmitFileComparator.isAvailableForEnvironment(platform),
@ -692,9 +693,9 @@ void main() {
environment: <String, String>{ environment: <String, String>{
'FLUTTER_ROOT': _kFlutterRoot, 'FLUTTER_ROOT': _kFlutterRoot,
'SWARMING_TASK_ID' : '12345678990', 'SWARMING_TASK_ID' : '12345678990',
'GOLD_TRYJOB' : 'git/ref/12345/head' 'GOLD_TRYJOB' : 'git/ref/12345/head',
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterPreSubmitFileComparator.isAvailableForEnvironment(platform), FlutterPreSubmitFileComparator.isAvailableForEnvironment(platform),
@ -709,7 +710,7 @@ void main() {
'SWARMING_TASK_ID' : '12345678990', 'SWARMING_TASK_ID' : '12345678990',
'GOLDCTL' : 'goldctl', 'GOLDCTL' : 'goldctl',
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterPreSubmitFileComparator.isAvailableForEnvironment(platform), FlutterPreSubmitFileComparator.isAvailableForEnvironment(platform),
@ -724,9 +725,9 @@ void main() {
'CIRRUS_CI': 'true', 'CIRRUS_CI': 'true',
'CIRRUS_PR': '', 'CIRRUS_PR': '',
'CIRRUS_BRANCH': 'master', 'CIRRUS_BRANCH': 'master',
'GOLD_SERVICE_ACCOUNT': 'service account...' 'GOLD_SERVICE_ACCOUNT': 'service account...',
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform), FlutterPostSubmitFileComparator.isAvailableForEnvironment(platform),
@ -744,7 +745,7 @@ void main() {
'FLUTTER_ROOT': _kFlutterRoot, 'FLUTTER_ROOT': _kFlutterRoot,
'CIRRUS_CI' : 'yep', 'CIRRUS_CI' : 'yep',
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterSkippingFileComparator.isAvailableForEnvironment(platform), FlutterSkippingFileComparator.isAvailableForEnvironment(platform),
@ -771,7 +772,7 @@ void main() {
environment: <String, String>{ environment: <String, String>{
'FLUTTER_ROOT': _kFlutterRoot, 'FLUTTER_ROOT': _kFlutterRoot,
}, },
operatingSystem: 'macos' operatingSystem: 'macos',
); );
expect( expect(
FlutterSkippingFileComparator.isAvailableForEnvironment( FlutterSkippingFileComparator.isAvailableForEnvironment(
@ -795,7 +796,7 @@ void main() {
fs: fs, fs: fs,
platform: FakePlatform( platform: FakePlatform(
environment: <String, String>{'FLUTTER_ROOT': _kFlutterRoot}, environment: <String, String>{'FLUTTER_ROOT': _kFlutterRoot},
operatingSystem: 'macos' operatingSystem: 'macos',
), ),
); );

View File

@ -20,10 +20,14 @@ String authTemplate({
/// https://flutter-gold.skia.org/img/images/[imageHash].png /// https://flutter-gold.skia.org/img/images/[imageHash].png
List<List<int>> imageResponseTemplate() { List<List<int>> imageResponseTemplate() {
return <List<int>>[ return <List<int>>[
<int>[137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, <int>[
72, 68, 82, 0, 0, 0, 1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0], 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73,
<int>[0, 0, 11, 73, 68, 65, 84, 120, 1, 99, 97, 0, 2, 0, 72, 68, 82, 0, 0, 0, 1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0,
],
<int>[
0, 0, 11, 73, 68, 65, 84, 120, 1, 99, 97, 0, 2, 0,
0, 25, 0, 5, 144, 240, 54, 245, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 0, 25, 0, 5, 144, 240, 54, 245, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96,
130], 130,
],
]; ];
} }

View File

@ -722,7 +722,7 @@ abstract class WidgetController {
delta: offsets[t+1] - offsets[t], delta: offsets[t+1] - offsets[t],
pointer: pointer, pointer: pointer,
buttons: buttons, buttons: buttons,
) ),
]), ]),
], ],
PointerEventRecord(duration, <PointerEvent>[ PointerEventRecord(duration, <PointerEvent>[
@ -734,7 +734,7 @@ abstract class WidgetController {
// change = PointerChange.up, which translates to PointerUpEvent, // change = PointerChange.up, which translates to PointerUpEvent,
// doesn't provide the button field. // doesn't provide the button field.
// buttons: buttons, // buttons: buttons,
) ),
]), ]),
]; ];
return TestAsyncUtils.guard<void>(() async { return TestAsyncUtils.guard<void>(() async {

View File

@ -604,7 +604,7 @@ Matcher matchesSemantics({
if (hasToggledState) SemanticsFlag.hasToggledState, if (hasToggledState) SemanticsFlag.hasToggledState,
if (isToggled) SemanticsFlag.isToggled, if (isToggled) SemanticsFlag.isToggled,
if (hasImplicitScrolling) SemanticsFlag.hasImplicitScrolling, if (hasImplicitScrolling) SemanticsFlag.hasImplicitScrolling,
if (isSlider) SemanticsFlag.isSlider if (isSlider) SemanticsFlag.isSlider,
]; ];
final List<SemanticsAction> actions = <SemanticsAction>[ final List<SemanticsAction> actions = <SemanticsAction>[

View File

@ -274,7 +274,7 @@ class TestAsyncUtils {
if (_scopeStack.isNotEmpty) { if (_scopeStack.isNotEmpty) {
final List<DiagnosticsNode> information = <DiagnosticsNode>[ final List<DiagnosticsNode> information = <DiagnosticsNode>[
ErrorSummary('Asynchronous call to guarded function leaked.'), ErrorSummary('Asynchronous call to guarded function leaked.'),
ErrorHint('You must use "await" with all Future-returning test APIs.') ErrorHint('You must use "await" with all Future-returning test APIs.'),
]; ];
for (final _AsyncScope scope in _scopeStack) { for (final _AsyncScope scope in _scopeStack) {
final _StackEntry? guarder = _findResponsibleMethod(scope.creationStack, 'guard', information); final _StackEntry? guarder = _findResponsibleMethod(scope.creationStack, 'guard', information);

Some files were not shown because too many files have changed in this diff Show More