enable lint prefer_final_in_for_each (#47724)

This commit is contained in:
Alexandre Ardhuin
2020-01-07 16:32:04 +01:00
committed by GitHub
parent fa337f5922
commit 4f9b6cf017
369 changed files with 1219 additions and 1220 deletions

View File

@@ -25,7 +25,7 @@ void main() {
focusNode.requestFocus();
await tester.idle();
for (String platform in platforms) {
for (final String platform in platforms) {
await tester.sendKeyEvent(LogicalKeyboardKey.shiftLeft, platform: platform);
await tester.sendKeyEvent(LogicalKeyboardKey.shift, platform: platform);
await tester.sendKeyDownEvent(LogicalKeyboardKey.keyA, platform: platform);

View File

@@ -530,9 +530,9 @@ void main() {
int actions = 0;
int flags = 0;
const CustomSemanticsAction action = CustomSemanticsAction(label: 'test');
for (int index in SemanticsAction.values.keys)
for (final int index in SemanticsAction.values.keys)
actions |= index;
for (int index in SemanticsFlag.values.keys)
for (final int index in SemanticsFlag.values.keys)
// TODO(mdebbar): Remove this if after https://github.com/flutter/engine/pull/9894
if (SemanticsFlag.values[index] != SemanticsFlag.isMultiline)
flags |= index;

View File

@@ -20,7 +20,7 @@ void testConfig(
test(description, () {
expect(actualStringValue, expectedStringValue);
for (Type key in otherExpectedValues.keys) {
for (final Type key in otherExpectedValues.keys) {
expect(otherActualValues[key], otherExpectedValues[key]);
}
});