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';
// 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,
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() {
final MemoryFileSystem fs = MemoryFileSystem();

View file

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

View file

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

View file

@ -62,7 +62,7 @@ class ListItem extends StatelessWidget {
_buildUserInfo(),
const SizedBox(
height: 10,
)
),
];
if (index % 3 != 0) {
contents.add(_buildImageContent());
@ -140,7 +140,7 @@ class ListItem extends StatelessWidget {
),
const SizedBox(
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.
0x0d, 0x00, 0xa0, 0xe1,
// "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,
700,
800,
900
900,
];
static const List<int> accentKeys = <int>[100, 200, 400, 700];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1124,7 +1124,7 @@ void main() {
FakeCommand(
command: const <String>['git', 'push', '', 'HEAD:refs/heads/'],
exception: GitException(gitPushErrorMessage, <String>['git', 'push', '--force', '', 'HEAD:refs/heads/']),
)
),
]);
final NextContext nextContext = NextContext(
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']));
if (Platform.isLinux || Platform.isMacOS) {
expect(
test.tests,
containsAllInOrder(<String>[
'./test_utilities/bin/flutter_test_runner.sh app_flutter',
'./test_utilities/bin/flutter_test_runner.sh repo_dashboard'
]));
test.tests,
containsAllInOrder(<String>[
'./test_utilities/bin/flutter_test_runner.sh app_flutter',
'./test_utilities/bin/flutter_test_runner.sh repo_dashboard',
]),
);
} else if (Platform.isWindows) {
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',
'--template',
'module',
'hello_module'
'hello_module',
],
);
@ -410,7 +410,7 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
'ios-framework',
'--cocoapods',
'--force', // Allow podspec creation on master.
'--output=$cocoapodsOutputDirectoryName'
'--output=$cocoapodsOutputDirectoryName',
],
);
});

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -50,7 +50,7 @@ class ABTest {
final Map<String, dynamic> resultMap = results as Map<String, dynamic>;
return <String, List<double>> {
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',
'Average A', '(noise)',
'Average B', '(noise)',
'Speed-up'
'Speed-up',
];
final List<FieldJustification> alignments = <FieldJustification>[
FieldJustification.LEFT,
FieldJustification.RIGHT, FieldJustification.LEFT,
FieldJustification.RIGHT, FieldJustification.LEFT,
FieldJustification.CENTER
FieldJustification.CENTER,
];
final List<int> lengths = List<int>.filled(6, 0);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -34,11 +34,11 @@ void main() {
<Map<String, dynamic>>[
<String, dynamic>{
'name': 'ImageCache.putIfAbsent',
'args': <String, dynamic>{'key': 'Test', 'isolateId': isolateId}
'args': <String, dynamic>{'key': 'Test', 'isolateId': isolateId},
},
<String, dynamic>{
'name': 'listener',
'args': <String, dynamic>{'isolateId': isolateId}
'args': <String, dynamic>{'isolateId': isolateId},
},
<String, dynamic>{
'name': 'ImageCache.clear',
@ -48,15 +48,15 @@ void main() {
'liveImages': 1,
'currentSizeInBytes': 0,
'isolateId': isolateId,
}
},
},
<String, dynamic>{
'name': 'ImageCache.putIfAbsent',
'args': <String, dynamic>{'key': 'Test2', 'isolateId': isolateId}
'args': <String, dynamic>{'key': 'Test2', 'isolateId': isolateId},
},
<String, dynamic>{
'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);
},
child: const Text('Destructive Action'),
)
),
],
),
);

View file

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

View file

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

View file

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

View file

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

View file

@ -49,7 +49,7 @@ class MyStatelessWidget extends StatelessWidget {
ElevatedButton(
child: const Text('Close BottomSheet'),
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,
),
),
)
),
],
),
),

View file

@ -267,7 +267,7 @@ class _HomeState extends State<Home> with TickerProviderStateMixin<Home> {
Destination(0, 'Teal', Icons.home, Colors.teal),
Destination(1, 'Cyan', Icons.business, Colors.cyan),
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;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -34,7 +34,7 @@ class ExampleWidget extends StatelessWidget {
fontFamily: 'Sorts Mill Goudy',
fontFeatures: <FontFeature>[
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: const EdgeInsets.only(top: 16),
child: Text('Result: ${snapshot.data}'),
)
),
];
} else if (snapshot.hasError) {
children = <Widget>[
@ -66,7 +66,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Padding(
padding: const EdgeInsets.only(top: 16),
child: Text('Error: ${snapshot.error}'),
)
),
];
} else {
children = const <Widget>[
@ -78,7 +78,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Padding(
padding: EdgeInsets.only(top: 16),
child: Text('Awaiting result...'),
)
),
];
}
return Center(

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1907,7 +1907,7 @@ class ThemeData with Diagnosticable {
static Map<Object, ThemeExtension<dynamic>> _themeExtensionIterableToMap(Iterable<ThemeExtension<dynamic>> extensionsIterable) {
return Map<Object, ThemeExtension<dynamic>>.unmodifiable(<Object, ThemeExtension<dynamic>>{
// 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,
width: 1000.0,
child: Text('Test'),
)
]
)
),
],
),
));
expect(find.byType(StretchingOverscrollIndicator), findsNothing);
@ -1094,9 +1094,9 @@ void main() {
height: 1000.0,
width: 1000.0,
child: Text('Test'),
)
]
)
),
],
),
));
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);
@ -1106,15 +1106,15 @@ void main() {
testWidgets('ScrollBehavior stretch android overscroll indicator via useMaterial3 flag', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(
theme: ThemeData(useMaterial3: true),
home: ListView(
children: const <Widget>[
SizedBox(
height: 1000.0,
width: 1000.0,
child: Text('Test'),
)
]
)
home: ListView(
children: const <Widget>[
SizedBox(
height: 1000.0,
width: 1000.0,
child: Text('Test'),
),
],
),
));
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);
@ -1131,9 +1131,9 @@ void main() {
height: 1000.0,
width: 1000.0,
child: Text('Test'),
)
]
)
),
],
),
));
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);
@ -1151,9 +1151,9 @@ void main() {
height: 1000.0,
width: 1000.0,
child: Text('Test'),
)
]
)
),
],
),
));
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);

View file

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

View file

@ -869,8 +869,8 @@ void main() {
bounds: Rect.fromLTRB(390, 0, 410, 600),
type: DisplayFeatureType.cutout,
state: DisplayFeatureState.unknown,
)
]
),
],
),
child: Scaffold(
body: Navigator(
@ -2215,20 +2215,22 @@ void main() {
home: Scaffold(
appBar: AppBar(
title: const Text('PopupMenu Test'),
actions: <Widget>[PopupMenuButton<int>(
child: SizedBox(
key: buttonKey,
height: height,
width: width,
child: const ColoredBox(
color: Colors.pink,
actions: <Widget>[
PopupMenuButton<int>(
child: SizedBox(
key: buttonKey,
height: height,
width: width,
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(),
),
@ -2269,30 +2271,32 @@ void main() {
home: Scaffold(
appBar: AppBar(
title: const Text('PopupMenu Test'),
actions: <Widget>[PopupMenuButton<int>(
child: SizedBox(
key: buttonKey,
height: height,
width: width,
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.
},
),
actions: <Widget>[
PopupMenuButton<int>(
child: SizedBox(
key: buttonKey,
height: height,
width: width,
child: const ColoredBox(
color: Colors.pink,
),
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(),
),
@ -2570,7 +2574,7 @@ void main() {
splashRadius: splashRadius,
child: const Text('An item'),
itemBuilder: (_) => <PopupMenuEntry<String>>[
const PopupMenuDivider()
const PopupMenuDivider(),
],
),
),

View file

@ -662,7 +662,7 @@ void main() {
"trackBorderColor: Instance of '_MaterialStatePropertyWith<Color?>'",
'crossAxisMargin: 3.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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1470,7 +1470,7 @@ void main() {
setState = stateSetter;
return Actions(
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(
builder: (BuildContext context3) {
@ -1579,7 +1579,7 @@ void main() {
context: context2,
),
context: context3,
)
),
},
child: Builder(
builder: (BuildContext context4) {

View file

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

View file

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

View file

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

View file

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

View file

@ -131,15 +131,15 @@ void main() {
'enabled': true,
'shortcutTrigger': 100,
'shortcutModifiers': 1,
}
]
},
],
},
<String, Object?>{
'id': 17,
'label': 'Sub Menu 12',
'enabled': true,
}
]
},
],
},
<String, Object?>{
'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 {
await tester.pumpWidget(Directionality(
await tester.pumpWidget(
Directionality(
textDirection: TextDirection.ltr,
child: ScrollConfiguration(
behavior: const ScrollBehavior(),
@ -92,35 +93,38 @@ void main() {
height: 1000.0,
width: 1000.0,
child: Text('Test'),
)
]
)
),
],
),
),
));
),
);
expect(find.byType(StretchingOverscrollIndicator), findsNothing);
expect(find.byType(GlowingOverscrollIndicator), findsOneWidget);
}, variant: TargetPlatformVariant.only(TargetPlatform.android));
testWidgets('ScrollBehavior stretch android overscroll indicator', (WidgetTester tester) async {
await tester.pumpWidget(Directionality(
textDirection: TextDirection.ltr,
child: MediaQuery(
data: const MediaQueryData(size: Size(800, 600)),
child: ScrollConfiguration(
await tester.pumpWidget(
Directionality(
textDirection: TextDirection.ltr,
child: MediaQuery(
data: const MediaQueryData(size: Size(800, 600)),
child: ScrollConfiguration(
behavior: const ScrollBehavior(androidOverscrollIndicator: AndroidOverscrollIndicator.stretch),
child: ListView(
children: const <Widget>[
SizedBox(
height: 1000.0,
width: 1000.0,
child: Text('Test'),
)
]
)
children: const <Widget>[
SizedBox(
height: 1000.0,
width: 1000.0,
child: Text('Test'),
),
],
),
),
),
),
));
);
expect(find.byType(StretchingOverscrollIndicator), findsOneWidget);
expect(find.byType(GlowingOverscrollIndicator), findsNothing);

View file

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

View file

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

View file

@ -411,8 +411,8 @@ void main() {
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.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 {
@ -429,8 +429,8 @@ void main() {
3.14159, 0.0, 0.0, 0.0,
0.0, 3.14159, 0.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 {
@ -447,8 +447,8 @@ void main() {
moreOrLessEquals(0.7071067811865476), moreOrLessEquals(0.7071067811865475), 0.0, 0.0,
moreOrLessEquals(-0.7071067811865475), moreOrLessEquals(0.7071067811865476), 0.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 {
@ -469,8 +469,8 @@ void main() {
moreOrLessEquals(0.7071067811865476), moreOrLessEquals(0.7071067811865475), 0.0, 0.0,
moreOrLessEquals(-0.7071067811865475), moreOrLessEquals(0.7071067811865476), 0.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 {

View file

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

View file

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

View file

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

View file

@ -108,7 +108,7 @@ void main() {
await driver.waitFor(find.byTooltip('foo'), timeout: _kTestTimeout);
expect(log, <String>[
'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]',
'getFlagList',
'setVMTimelineFlags []',
'getVMTimeline null null'
'getVMTimeline null null',
]);
expect(timeline.events!.single.name, 'test event');
@ -679,7 +679,7 @@ void main() {
expect(fakeClient.commandLog, <String>[
'ext.flutter.driver {command: set_frame_sync, enabled: false}',
'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',
'ts': timeStamp,
'args': <String, String>{
'vsync_transitions_missed': vsyncsMissed.toString()
}
'vsync_transitions_missed': vsyncsMissed.toString(),
},
};
Map<String, dynamic> lagEnd(int timeStamp, int vsyncsMissed) => <String, dynamic>{
@ -62,8 +62,8 @@ void main() {
'ph': 'e',
'ts': timeStamp,
'args': <String, String>{
'vsync_transitions_missed': vsyncsMissed.toString()
}
'vsync_transitions_missed': vsyncsMissed.toString(),
},
};
Map<String, dynamic> cpuUsage(int timeStamp, double cpuUsage) => <String, dynamic>{
@ -71,8 +71,8 @@ void main() {
'name': 'CpuUsage',
'ts': timeStamp,
'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>{
@ -82,7 +82,7 @@ void main() {
'args': <String, String>{
'owned_shared_memory_usage': shared.toString(),
'dirty_memory_usage': dirty.toString(),
}
},
};
Map<String, dynamic> platformVsync(int timeStamp) => <String, dynamic>{
@ -98,7 +98,7 @@ void main() {
'args': <String, dynamic>{
'StartTime': startTime,
'TargetTime': endTime,
}
},
};
List<Map<String, dynamic>> _genGC(String name, int count, int startTime, int timeDiff) {

View file

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

View file

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

View file

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

View file

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

View file

@ -274,7 +274,7 @@ class TestAsyncUtils {
if (_scopeStack.isNotEmpty) {
final List<DiagnosticsNode> information = <DiagnosticsNode>[
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) {
final _StackEntry? guarder = _findResponsibleMethod(scope.creationStack, 'guard', information);

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