enable lint prefer_final_in_for_each (#47724)
This commit is contained in:
committed by
GitHub
parent
fa337f5922
commit
4f9b6cf017
@@ -84,7 +84,7 @@ Iterable<int> generateIterableList() {
|
||||
|
||||
int sumIterable(Iterable<int> values) {
|
||||
int result = 0;
|
||||
for (int value in values) {
|
||||
for (final int value in values) {
|
||||
result += value;
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -71,7 +71,7 @@ void main() {
|
||||
|
||||
String consumeSpan(Iterable<InlineSpanSemanticsInformation> items) {
|
||||
String result = '';
|
||||
for (InlineSpanSemanticsInformation span in items) {
|
||||
for (final InlineSpanSemanticsInformation span in items) {
|
||||
result += span.text;
|
||||
}
|
||||
return result;
|
||||
@@ -81,7 +81,7 @@ String consumeSpan(Iterable<InlineSpanSemanticsInformation> items) {
|
||||
Iterable<InlineSpanSemanticsInformation> combineSemanticsInfoSyncStar(List<InlineSpanSemanticsInformation> inputs) sync* {
|
||||
String workingText = '';
|
||||
String workingLabel;
|
||||
for (InlineSpanSemanticsInformation info in inputs) {
|
||||
for (final InlineSpanSemanticsInformation info in inputs) {
|
||||
if (info.requiresOwnNode) {
|
||||
if (workingText != null) {
|
||||
yield InlineSpanSemanticsInformation(workingText, semanticsLabel: workingLabel ?? workingText);
|
||||
@@ -110,7 +110,7 @@ Iterable<InlineSpanSemanticsInformation> combineSemanticsInfoList(List<InlineSpa
|
||||
String workingText = '';
|
||||
String workingLabel;
|
||||
final List<InlineSpanSemanticsInformation> result = <InlineSpanSemanticsInformation>[];
|
||||
for (InlineSpanSemanticsInformation info in inputs) {
|
||||
for (final InlineSpanSemanticsInformation info in inputs) {
|
||||
if (info.requiresOwnNode) {
|
||||
if (workingText != null) {
|
||||
result.add(InlineSpanSemanticsInformation(workingText, semanticsLabel: workingLabel ?? workingText));
|
||||
|
||||
Reference in New Issue
Block a user