diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/recorder.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/recorder.dart index e3e4637c68..9bdcb0fe9e 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/web/recorder.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/web/recorder.dart @@ -347,8 +347,8 @@ abstract class WidgetRecorder extends Recorder implements FrameRecorder { final List _didStopCallbacks = []; @override - void registerDidStop(VoidCallback fn) { - _didStopCallbacks.add(fn); + void registerDidStop(VoidCallback cb) { + _didStopCallbacks.add(cb); } @override @@ -443,8 +443,8 @@ abstract class WidgetBuildRecorder extends Recorder implements FrameRecorder { final List _didStopCallbacks = []; @override - void registerDidStop(VoidCallback fn) { - _didStopCallbacks.add(fn); + void registerDidStop(VoidCallback cb) { + _didStopCallbacks.add(cb); } @override diff --git a/packages/flutter/lib/src/material/material_localizations.dart b/packages/flutter/lib/src/material/material_localizations.dart index ec8cace7e8..7bba6618f5 100644 --- a/packages/flutter/lib/src/material/material_localizations.dart +++ b/packages/flutter/lib/src/material/material_localizations.dart @@ -762,10 +762,10 @@ class DefaultMaterialLocalizations implements MaterialLocalizations { String get dateRangeEndLabel => 'End Date'; @override - String dateRangeStartDateSemanticLabel(String fullDate) => 'Start date $fullDate'; + String dateRangeStartDateSemanticLabel(String formattedDate) => 'Start date $formattedDate'; @override - String dateRangeEndDateSemanticLabel(String fullDate) => 'End date $fullDate'; + String dateRangeEndDateSemanticLabel(String formattedDate) => 'End date $formattedDate'; @override String get invalidDateFormatLabel => 'Invalid format.'; diff --git a/packages/flutter/lib/src/services/message_codecs.dart b/packages/flutter/lib/src/services/message_codecs.dart index e9399995cf..df5cab241b 100644 --- a/packages/flutter/lib/src/services/message_codecs.dart +++ b/packages/flutter/lib/src/services/message_codecs.dart @@ -123,10 +123,10 @@ class JSONMethodCodec implements MethodCodec { const JSONMethodCodec(); @override - ByteData encodeMethodCall(MethodCall call) { + ByteData encodeMethodCall(MethodCall methodCall) { return const JSONMessageCodec().encodeMessage({ - 'method': call.method, - 'args': call.arguments, + 'method': methodCall.method, + 'args': methodCall.arguments, })!; } @@ -555,10 +555,10 @@ class StandardMethodCodec implements MethodCodec { final StandardMessageCodec messageCodec; @override - ByteData encodeMethodCall(MethodCall call) { + ByteData encodeMethodCall(MethodCall methodCall) { final WriteBuffer buffer = WriteBuffer(); - messageCodec.writeValue(buffer, call.method); - messageCodec.writeValue(buffer, call.arguments); + messageCodec.writeValue(buffer, methodCall.method); + messageCodec.writeValue(buffer, methodCall.arguments); return buffer.done(); } diff --git a/packages/flutter/lib/src/widgets/autofill.dart b/packages/flutter/lib/src/widgets/autofill.dart index 31569f27bf..107502e47f 100644 --- a/packages/flutter/lib/src/widgets/autofill.dart +++ b/packages/flutter/lib/src/widgets/autofill.dart @@ -129,7 +129,7 @@ class AutofillGroupState extends State with AutofillScopeMixin { bool _isTopmostAutofillGroup = false; @override - AutofillClient? getAutofillClient(String tag) => _clients[tag]; + AutofillClient? getAutofillClient(String autofillId) => _clients[autofillId]; @override Iterable get autofillClients { diff --git a/packages/flutter/lib/src/widgets/scrollable.dart b/packages/flutter/lib/src/widgets/scrollable.dart index 5db22ae983..0d746373e2 100644 --- a/packages/flutter/lib/src/widgets/scrollable.dart +++ b/packages/flutter/lib/src/widgets/scrollable.dart @@ -539,10 +539,10 @@ class ScrollableState extends State with TickerProviderStateMixin, R @override @protected - void setCanDrag(bool canDrag) { - if (canDrag == _lastCanDrag && (!canDrag || widget.axis == _lastAxisDirection)) + void setCanDrag(bool value) { + if (value == _lastCanDrag && (!value || widget.axis == _lastAxisDirection)) return; - if (!canDrag) { + if (!value) { _gestureRecognizers = const {}; // Cancel the active hold/drag (if any) because the gesture recognizers // will soon be disposed by our RawGestureDetector, and we won't be @@ -592,7 +592,7 @@ class ScrollableState extends State with TickerProviderStateMixin, R break; } } - _lastCanDrag = canDrag; + _lastCanDrag = value; _lastAxisDirection = widget.axis; if (_gestureDetectorKey.currentState != null) _gestureDetectorKey.currentState!.replaceGestureRecognizers(_gestureRecognizers); diff --git a/packages/flutter/lib/src/widgets/scrollbar.dart b/packages/flutter/lib/src/widgets/scrollbar.dart index 5f63ccc62e..b363847589 100644 --- a/packages/flutter/lib/src/widgets/scrollbar.dart +++ b/packages/flutter/lib/src/widgets/scrollbar.dart @@ -686,21 +686,21 @@ class ScrollbarPainter extends ChangeNotifier implements CustomPainter { } @override - bool shouldRepaint(ScrollbarPainter old) { + bool shouldRepaint(ScrollbarPainter oldDelegate) { // Should repaint if any properties changed. - return color != old.color - || trackColor != old.trackColor - || trackBorderColor != old.trackBorderColor - || textDirection != old.textDirection - || thickness != old.thickness - || fadeoutOpacityAnimation != old.fadeoutOpacityAnimation - || mainAxisMargin != old.mainAxisMargin - || crossAxisMargin != old.crossAxisMargin - || radius != old.radius - || minLength != old.minLength - || padding != old.padding - || minOverscrollLength != old.minOverscrollLength - || scrollbarOrientation != old.scrollbarOrientation; + return color != oldDelegate.color + || trackColor != oldDelegate.trackColor + || trackBorderColor != oldDelegate.trackBorderColor + || textDirection != oldDelegate.textDirection + || thickness != oldDelegate.thickness + || fadeoutOpacityAnimation != oldDelegate.fadeoutOpacityAnimation + || mainAxisMargin != oldDelegate.mainAxisMargin + || crossAxisMargin != oldDelegate.crossAxisMargin + || radius != oldDelegate.radius + || minLength != oldDelegate.minLength + || padding != oldDelegate.padding + || minOverscrollLength != oldDelegate.minOverscrollLength + || scrollbarOrientation != oldDelegate.scrollbarOrientation; } @override diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart index 1b211afe8c..503e09e9e0 100644 --- a/packages/flutter/lib/src/widgets/widget_inspector.dart +++ b/packages/flutter/lib/src/widgets/widget_inspector.dart @@ -3247,14 +3247,14 @@ class InspectorSerializationDelegate implements DiagnosticsSerializationDelegate } @override - List filterChildren(List children, DiagnosticsNode owner) { - return service._filterChildren(children, this); + List filterChildren(List nodes, DiagnosticsNode owner) { + return service._filterChildren(nodes, this); } @override - List filterProperties(List properties, DiagnosticsNode owner) { + List filterProperties(List nodes, DiagnosticsNode owner) { final bool createdByLocalProject = _nodesCreatedByLocalProject.contains(owner); - return properties.where((DiagnosticsNode node) { + return nodes.where((DiagnosticsNode node) { return !node.isFiltered(createdByLocalProject ? DiagnosticLevel.fine : DiagnosticLevel.info); }).toList(); } diff --git a/packages/flutter_localizations/lib/src/material_localizations.dart b/packages/flutter_localizations/lib/src/material_localizations.dart index d55180f4c7..abe442c2db 100644 --- a/packages/flutter_localizations/lib/src/material_localizations.dart +++ b/packages/flutter_localizations/lib/src/material_localizations.dart @@ -246,8 +246,8 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations { String get dateRangeStartDateSemanticLabelRaw; @override - String dateRangeStartDateSemanticLabel(String fullDate) { - return dateRangeStartDateSemanticLabelRaw.replaceFirst(r'$fullDate', fullDate); + String dateRangeStartDateSemanticLabel(String formattedDate) { + return dateRangeStartDateSemanticLabelRaw.replaceFirst(r'$fullDate', formattedDate); } /// The raw version of [dateRangeEndDateSemanticLabel], with `$fullDate` verbatim @@ -256,8 +256,8 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations { String get dateRangeEndDateSemanticLabelRaw; @override - String dateRangeEndDateSemanticLabel(String fullDate) { - return dateRangeEndDateSemanticLabelRaw.replaceFirst(r'$fullDate', fullDate); + String dateRangeEndDateSemanticLabel(String formattedDate) { + return dateRangeEndDateSemanticLabelRaw.replaceFirst(r'$fullDate', formattedDate); } /// The raw version of [aboutListTileTitle], with `$applicationName` verbatim @@ -646,9 +646,9 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations { String get remainingTextFieldCharacterCountOther; @override - String remainingTextFieldCharacterCount(int remainingCount) { + String remainingTextFieldCharacterCount(int remaining) { return intl.Intl.pluralLogic( - remainingCount, + remaining, zero: remainingTextFieldCharacterCountZero, one: remainingTextFieldCharacterCountOne, two: remainingTextFieldCharacterCountTwo, @@ -656,7 +656,7 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations { few: remainingTextFieldCharacterCountFew, other: remainingTextFieldCharacterCountOther, locale: _localeName, - ).replaceFirst(r'$remainingCount', formatDecimal(remainingCount)); + ).replaceFirst(r'$remainingCount', formatDecimal(remaining)); } @override