diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart index 8b84416336..7cf2571d07 100644 --- a/dev/bots/analyze.dart +++ b/dev/bots/analyze.dart @@ -128,7 +128,7 @@ Future run(List arguments) async { final RegExp _findDeprecationPattern = RegExp(r'@[Dd]eprecated'); final RegExp _deprecationPattern1 = RegExp(r'^( *)@Deprecated\($'); // flutter_ignore: deprecation_syntax (see analyze.dart) final RegExp _deprecationPattern2 = RegExp(r"^ *'(.+) '$"); -final RegExp _deprecationPattern3 = RegExp(r"^ *'This feature was deprecated after v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9]+\.[0-9]+\.pre)?\.'$"); +final RegExp _deprecationPattern3 = RegExp(r"^ *'This feature was deprecated after v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9]+\.[0-9]+\.pre)?\.',?$"); final RegExp _deprecationPattern4 = RegExp(r'^ *\)$'); /// Some deprecation notices are special, for example they're used to annotate members that diff --git a/packages/flutter/lib/src/animation/animation_controller.dart b/packages/flutter/lib/src/animation/animation_controller.dart index 32ce9892a5..a2dc5a0d8e 100644 --- a/packages/flutter/lib/src/animation/animation_controller.dart +++ b/packages/flutter/lib/src/animation/animation_controller.dart @@ -446,7 +446,7 @@ class AnimationController extends Animation throw FlutterError( 'AnimationController.forward() called with no default duration.\n' 'The "duration" property should be set, either in the constructor or later, before ' - 'calling the forward() function.' + 'calling the forward() function.', ); } return true; @@ -479,7 +479,7 @@ class AnimationController extends Animation throw FlutterError( 'AnimationController.reverse() called with no default duration or reverseDuration.\n' 'The "duration" or "reverseDuration" property should be set, either in the constructor or later, before ' - 'calling the reverse() function.' + 'calling the reverse() function.', ); } return true; @@ -518,7 +518,7 @@ class AnimationController extends Animation 'AnimationController.animateTo() called with no explicit duration and no default duration.\n' 'Either the "duration" argument to the animateTo() method should be provided, or the ' '"duration" property should be set, either in the constructor or later, before ' - 'calling the animateTo() function.' + 'calling the animateTo() function.', ); } return true; @@ -551,7 +551,7 @@ class AnimationController extends Animation 'AnimationController.animateBack() called with no explicit duration and no default duration or reverseDuration.\n' 'Either the "duration" argument to the animateBack() method should be provided, or the ' '"duration" or "reverseDuration" property should be set, either in the constructor or later, before ' - 'calling the animateBack() function.' + 'calling the animateBack() function.', ); } return true; @@ -642,7 +642,7 @@ class AnimationController extends Animation 'AnimationController.repeat() called without an explicit period and with no default Duration.\n' 'Either the "period" argument to the repeat() method should be provided, or the ' '"duration" property should be set, either in the constructor or later, before ' - 'calling the repeat() function.' + 'calling the repeat() function.', ); } return true; diff --git a/packages/flutter/lib/src/animation/animations.dart b/packages/flutter/lib/src/animation/animations.dart index def82f13bf..1f52dfe0b5 100644 --- a/packages/flutter/lib/src/animation/animations.dart +++ b/packages/flutter/lib/src/animation/animations.dart @@ -443,7 +443,7 @@ class CurvedAnimation extends Animation with AnimationWithParentMixin extends Animatable { else ErrorHint( 'There may be a dedicated "${begin.runtimeType}Tween" for this type, ' - 'or you may need to create one.' + 'or you may need to create one.', ), ]); } on TypeError { @@ -296,7 +296,7 @@ class Tween extends Animatable { else ErrorHint( 'There may be a dedicated "${begin.runtimeType}Tween" for this type, ' - 'or you may need to create one.' + 'or you may need to create one.', ), ]); } diff --git a/packages/flutter/lib/src/cupertino/action_sheet.dart b/packages/flutter/lib/src/cupertino/action_sheet.dart index c5fa8d06a3..7c1d7be950 100644 --- a/packages/flutter/lib/src/cupertino/action_sheet.dart +++ b/packages/flutter/lib/src/cupertino/action_sheet.dart @@ -1334,7 +1334,7 @@ class _RenderCupertinoAlertActions extends RenderBox } return constraints.constrain( - Size(constraints.maxWidth, verticalOffset) + Size(constraints.maxWidth, verticalOffset), ); } diff --git a/packages/flutter/lib/src/cupertino/date_picker.dart b/packages/flutter/lib/src/cupertino/date_picker.dart index 762cc100be..c607cda708 100644 --- a/packages/flutter/lib/src/cupertino/date_picker.dart +++ b/packages/flutter/lib/src/cupertino/date_picker.dart @@ -65,7 +65,7 @@ void _animateColumnControllerToItem(FixedExtentScrollController controller, int } const Widget _leftSelectionOverlay = CupertinoPickerDefaultSelectionOverlay(capRightEdge: false); -const Widget _centerSelectionOverlay = CupertinoPickerDefaultSelectionOverlay(capLeftEdge: false, capRightEdge: false,); +const Widget _centerSelectionOverlay = CupertinoPickerDefaultSelectionOverlay(capLeftEdge: false, capRightEdge: false); const Widget _rightSelectionOverlay = CupertinoPickerDefaultSelectionOverlay(capLeftEdge: false); // Lays out the date picker based on how much space each single column needs. @@ -803,7 +803,7 @@ class _CupertinoDatePickerDateTimeState extends State { }), looping: true, selectionOverlay: selectionOverlay, - ) + ), ); } @@ -1757,10 +1757,12 @@ class _CupertinoTimerPickerState extends State { setState(() { selectedHour = index; widget.onTimerDurationChanged( - Duration( - hours: selectedHour!, - minutes: selectedMinute, - seconds: selectedSecond ?? 0)); + Duration( + hours: selectedHour!, + minutes: selectedMinute, + seconds: selectedSecond ?? 0, + ), + ); }); }, children: List.generate(24, (int index) { @@ -1810,7 +1812,7 @@ class _CupertinoTimerPickerState extends State { magnification: _kMagnification, offAxisFraction: _calculateOffAxisFraction( additionalPadding.start, - widget.mode == CupertinoTimerPickerMode.ms ? 0 : 1 + widget.mode == CupertinoTimerPickerMode.ms ? 0 : 1, ), itemExtent: _kItemExtent, backgroundColor: widget.backgroundColor, @@ -1820,10 +1822,12 @@ class _CupertinoTimerPickerState extends State { setState(() { selectedMinute = index * widget.minuteInterval; widget.onTimerDurationChanged( - Duration( - hours: selectedHour ?? 0, - minutes: selectedMinute, - seconds: selectedSecond ?? 0)); + Duration( + hours: selectedHour ?? 0, + minutes: selectedMinute, + seconds: selectedSecond ?? 0, + ), + ); }); }, children: List.generate(60 ~/ widget.minuteInterval, (int index) { @@ -1874,7 +1878,7 @@ class _CupertinoTimerPickerState extends State { magnification: _kMagnification, offAxisFraction: _calculateOffAxisFraction( additionalPadding.start, - widget.mode == CupertinoTimerPickerMode.ms ? 1 : 2 + widget.mode == CupertinoTimerPickerMode.ms ? 1 : 2, ), itemExtent: _kItemExtent, backgroundColor: widget.backgroundColor, @@ -1884,10 +1888,12 @@ class _CupertinoTimerPickerState extends State { setState(() { selectedSecond = index * widget.secondInterval; widget.onTimerDurationChanged( - Duration( - hours: selectedHour ?? 0, - minutes: selectedMinute, - seconds: selectedSecond!)); + Duration( + hours: selectedHour ?? 0, + minutes: selectedMinute, + seconds: selectedSecond!, + ), + ); }); }, children: List.generate(60 ~/ widget.secondInterval, (int index) { @@ -1935,7 +1941,7 @@ class _CupertinoTimerPickerState extends State { TextStyle _textStyleFrom(BuildContext context, [double magnification = 1.0]) { final TextStyle textStyle = CupertinoTheme.of(context).textTheme.pickerTextStyle; return textStyle.copyWith( - fontSize: textStyle.fontSize! * magnification + fontSize: textStyle.fontSize! * magnification, ); } @@ -2000,16 +2006,16 @@ class _CupertinoTimerPickerState extends State { _buildHourColumn( EdgeInsetsDirectional.only( start: hourColumnStartPadding, - end: pickerColumnWidth - hourColumnStartPadding - hourLabelContentWidth + end: pickerColumnWidth - hourColumnStartPadding - hourLabelContentWidth, ), - _leftSelectionOverlay + _leftSelectionOverlay, ), _buildMinuteColumn( EdgeInsetsDirectional.only( start: pickerColumnWidth - minuteColumnEndPadding - minuteLabelContentWidth, - end: minuteColumnEndPadding + end: minuteColumnEndPadding, ), - _rightSelectionOverlay + _rightSelectionOverlay, ), ]; break; @@ -2029,16 +2035,16 @@ class _CupertinoTimerPickerState extends State { _buildMinuteColumn( EdgeInsetsDirectional.only( start: minuteColumnStartPadding, - end: pickerColumnWidth - minuteColumnStartPadding - minuteLabelContentWidth + end: pickerColumnWidth - minuteColumnStartPadding - minuteLabelContentWidth, ), - _leftSelectionOverlay + _leftSelectionOverlay, ), _buildSecondColumn( EdgeInsetsDirectional.only( start: pickerColumnWidth - secondColumnEndPadding - minuteLabelContentWidth, - end: secondColumnEndPadding + end: secondColumnEndPadding, ), - _rightSelectionOverlay + _rightSelectionOverlay, ), ]; break; @@ -2054,23 +2060,23 @@ class _CupertinoTimerPickerState extends State { _buildHourColumn( EdgeInsetsDirectional.only( start: _kTimerPickerMinHorizontalPadding, - end: math.max(hourColumnEndPadding, 0) + end: math.max(hourColumnEndPadding, 0), ), - _leftSelectionOverlay + _leftSelectionOverlay, ), _buildMinuteColumn( EdgeInsetsDirectional.only( start: minuteColumnPadding, - end: minuteColumnPadding + end: minuteColumnPadding, ), - _centerSelectionOverlay + _centerSelectionOverlay, ), _buildSecondColumn( EdgeInsetsDirectional.only( start: math.max(secondColumnStartPadding, 0), - end: _kTimerPickerMinHorizontalPadding + end: _kTimerPickerMinHorizontalPadding, ), - _rightSelectionOverlay + _rightSelectionOverlay, ), ]; break; diff --git a/packages/flutter/lib/src/cupertino/debug.dart b/packages/flutter/lib/src/cupertino/debug.dart index 39f2a00a2f..b7f65bf787 100644 --- a/packages/flutter/lib/src/cupertino/debug.dart +++ b/packages/flutter/lib/src/cupertino/debug.dart @@ -24,19 +24,19 @@ bool debugCheckHasCupertinoLocalizations(BuildContext context) { ErrorSummary('No CupertinoLocalizations found.'), ErrorDescription( '${context.widget.runtimeType} widgets require CupertinoLocalizations ' - 'to be provided by a Localizations widget ancestor.' + 'to be provided by a Localizations widget ancestor.', ), ErrorDescription( 'The cupertino library uses Localizations to generate messages, ' - 'labels, and abbreviations.' + 'labels, and abbreviations.', ), ErrorHint( 'To introduce a CupertinoLocalizations, either use a ' 'CupertinoApp at the root of your application to include them ' 'automatically, or add a Localization widget with a ' - 'CupertinoLocalizations delegate.' + 'CupertinoLocalizations delegate.', ), - ...context.describeMissingAncestor(expectedAncestorType: CupertinoLocalizations) + ...context.describeMissingAncestor(expectedAncestorType: CupertinoLocalizations), ]); } return true; diff --git a/packages/flutter/lib/src/cupertino/dialog.dart b/packages/flutter/lib/src/cupertino/dialog.dart index 8203d66b0d..ca028db6c3 100644 --- a/packages/flutter/lib/src/cupertino/dialog.dart +++ b/packages/flutter/lib/src/cupertino/dialog.dart @@ -1537,7 +1537,7 @@ class _RenderCupertinoDialogActions extends RenderBox ); return constraints.constrain( - Size(dialogWidth, childSize.height) + Size(dialogWidth, childSize.height), ); } else { // Each button gets half the available width, minus a single divider. @@ -1609,7 +1609,7 @@ class _RenderCupertinoDialogActions extends RenderBox // Our height is the accumulated height of all buttons and dividers. return constraints.constrain( - Size(dialogWidth, verticalOffset) + Size(dialogWidth, verticalOffset), ); } } diff --git a/packages/flutter/lib/src/cupertino/form_section.dart b/packages/flutter/lib/src/cupertino/form_section.dart index dfcb00edc4..b164d08850 100644 --- a/packages/flutter/lib/src/cupertino/form_section.dart +++ b/packages/flutter/lib/src/cupertino/form_section.dart @@ -259,14 +259,13 @@ class CupertinoFormSection extends StatelessWidget { // Refactored the decorate children group in one place to avoid repeating it // twice down bellow in the returned widget. final DecoratedBox decoratedChildrenGroup = DecoratedBox( - decoration: decoration ?? - BoxDecoration( - color: CupertinoDynamicColor.resolve( - decoration?.color ?? - CupertinoColors.secondarySystemGroupedBackground, - context), - borderRadius: childrenGroupBorderRadius, - ), + decoration: decoration ?? BoxDecoration( + color: CupertinoDynamicColor.resolve( + decoration?.color ?? CupertinoColors.secondarySystemGroupedBackground, + context, + ), + borderRadius: childrenGroupBorderRadius, + ), child: Column( children: childrenWithDividers, ), @@ -295,11 +294,12 @@ class CupertinoFormSection extends StatelessWidget { Padding( padding: margin, child: clipBehavior == Clip.none - ? decoratedChildrenGroup - : ClipRRect( - borderRadius: childrenGroupBorderRadius, - clipBehavior: clipBehavior, - child: decoratedChildrenGroup), + ? decoratedChildrenGroup + : ClipRRect( + borderRadius: childrenGroupBorderRadius, + clipBehavior: clipBehavior, + child: decoratedChildrenGroup, + ), ), if (footer != null) Align( diff --git a/packages/flutter/lib/src/cupertino/interface_level.dart b/packages/flutter/lib/src/cupertino/interface_level.dart index a31cb24581..8103de12ac 100644 --- a/packages/flutter/lib/src/cupertino/interface_level.dart +++ b/packages/flutter/lib/src/cupertino/interface_level.dart @@ -76,7 +76,7 @@ class CupertinoUserInterfaceLevel extends InheritedWidget { 'MaterialApp widget (those widgets introduce a CupertinoUserInterfaceLevel), or it can happen ' 'if the context you use comes from a widget above those widgets.\n' 'The context used was:\n' - ' $context' + ' $context', ); } diff --git a/packages/flutter/lib/src/cupertino/route.dart b/packages/flutter/lib/src/cupertino/route.dart index 751628209f..0fefe4aca9 100644 --- a/packages/flutter/lib/src/cupertino/route.dart +++ b/packages/flutter/lib/src/cupertino/route.dart @@ -848,7 +848,7 @@ class _CupertinoEdgeShadowDecoration extends Decoration { [ for (int i = 0; i < b._colors!.length; i += 1) Color.lerp(a._colors?[i], b._colors?[i], t)!, - ] + ], ); } diff --git a/packages/flutter/lib/src/cupertino/search_field.dart b/packages/flutter/lib/src/cupertino/search_field.dart index 9ca4a316df..da58fc7d20 100644 --- a/packages/flutter/lib/src/cupertino/search_field.dart +++ b/packages/flutter/lib/src/cupertino/search_field.dart @@ -365,12 +365,15 @@ class _CupertinoSearchTextFieldState extends State ); final IconThemeData iconThemeData = IconThemeData( - color: CupertinoDynamicColor.resolve(widget.itemColor, context), - size: scaledIconSize); + color: CupertinoDynamicColor.resolve(widget.itemColor, context), + size: scaledIconSize, + ); final Widget prefix = Padding( child: IconTheme( - child: const Icon(CupertinoIcons.search), data: iconThemeData), + data: iconThemeData, + child: const Icon(CupertinoIcons.search), + ), padding: widget.prefixInsets, ); diff --git a/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart b/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart index 745ec9c839..3c06648c61 100644 --- a/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart +++ b/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart @@ -130,7 +130,7 @@ class _SegmentState extends State<_Segment> with TickerProviderStateMixin< highlightPressScaleAnimation = highlightPressScaleController.drive( Tween( begin: highlightPressScaleAnimation.value, - end: widget.shouldScaleContent ? _kMinThumbScale : 1.0 + end: widget.shouldScaleContent ? _kMinThumbScale : 1.0, ), ); highlightPressScaleController.animateWith(_kThumbSpringAnimationSimulation); @@ -166,7 +166,7 @@ class _SegmentState extends State<_Segment> with TickerProviderStateMixin< scale: highlightPressScaleAnimation, child: widget.child, ), - ) + ), ), // The entire widget will assume the size of this widget, so when a // segment's "highlight" animation plays the size of the parent stays @@ -520,7 +520,7 @@ class _SegmentedControlState extends State( begin: thumbScaleAnimation.value, end: isExpanding ? 1 : _kMinThumbScale, - ) + ), ); thumbScaleController.animateWith(_kThumbSpringAnimationSimulation); } diff --git a/packages/flutter/lib/src/cupertino/tab_view.dart b/packages/flutter/lib/src/cupertino/tab_view.dart index df16682929..bf43db687c 100644 --- a/packages/flutter/lib/src/cupertino/tab_view.dart +++ b/packages/flutter/lib/src/cupertino/tab_view.dart @@ -209,7 +209,7 @@ class _CupertinoTabViewState extends State { ' 3. Otherwise, onGenerateRoute is called. It should return a ' 'non-null value for any valid route not handled by "builder" and "routes".\n' ' 4. Finally if all else fails onUnknownRoute is called.\n' - 'Unfortunately, onUnknownRoute was not set.' + 'Unfortunately, onUnknownRoute was not set.', ); } return true; @@ -221,7 +221,7 @@ class _CupertinoTabViewState extends State { 'The onUnknownRoute callback returned null.\n' 'When the $runtimeType requested the route $settings from its ' 'onUnknownRoute callback, the callback returned null. Such callbacks ' - 'must never return null.' + 'must never return null.', ); } return true; diff --git a/packages/flutter/lib/src/cupertino/text_field.dart b/packages/flutter/lib/src/cupertino/text_field.dart index 96922650a7..b0f79c0142 100644 --- a/packages/flutter/lib/src/cupertino/text_field.dart +++ b/packages/flutter/lib/src/cupertino/text_field.dart @@ -268,7 +268,7 @@ class CupertinoTextField extends StatefulWidget { @Deprecated( 'Use maxLengthEnforcement parameter which provides more specific ' 'behavior related to the maxLength limit. ' - 'This feature was deprecated after v1.25.0-5.0.pre.' + 'This feature was deprecated after v1.25.0-5.0.pre.', ) this.maxLengthEnforced = true, this.maxLengthEnforcement, @@ -419,7 +419,7 @@ class CupertinoTextField extends StatefulWidget { @Deprecated( 'Use maxLengthEnforcement parameter which provides more specific ' 'behavior related to the maxLength limit. ' - 'This feature was deprecated after v1.25.0-5.0.pre.' + 'This feature was deprecated after v1.25.0-5.0.pre.', ) this.maxLengthEnforced = true, this.maxLengthEnforcement, @@ -668,7 +668,7 @@ class CupertinoTextField extends StatefulWidget { @Deprecated( 'Use maxLengthEnforcement parameter which provides more specific ' 'behavior related to the maxLength limit. ' - 'This feature was deprecated after v1.25.0-5.0.pre.' + 'This feature was deprecated after v1.25.0-5.0.pre.', ) final bool maxLengthEnforced; diff --git a/packages/flutter/lib/src/cupertino/text_selection_toolbar.dart b/packages/flutter/lib/src/cupertino/text_selection_toolbar.dart index 620ccd4c9a..fe962f2259 100644 --- a/packages/flutter/lib/src/cupertino/text_selection_toolbar.dart +++ b/packages/flutter/lib/src/cupertino/text_selection_toolbar.dart @@ -295,7 +295,7 @@ class _RenderCupertinoTextSelectionToolbarShape extends RenderShiftedBox { Offset.zero & child!.size, _clipPath(), (PaintingContext innerContext, Offset innerOffset) => innerContext.paintChild(child!, innerOffset), - oldLayer: _clipPathLayer + oldLayer: _clipPathLayer, ); } diff --git a/packages/flutter/lib/src/foundation/_platform_io.dart b/packages/flutter/lib/src/foundation/_platform_io.dart index e5e4777e60..dc68d5547b 100644 --- a/packages/flutter/lib/src/foundation/_platform_io.dart +++ b/packages/flutter/lib/src/foundation/_platform_io.dart @@ -33,7 +33,7 @@ platform.TargetPlatform get defaultTargetPlatform { throw FlutterError( 'Unknown platform.\n' '${Platform.operatingSystem} was not recognized as a target platform. ' - 'Consider updating the list of TargetPlatforms to include this platform.' + 'Consider updating the list of TargetPlatforms to include this platform.', ); } return result!; diff --git a/packages/flutter/lib/src/foundation/assertions.dart b/packages/flutter/lib/src/foundation/assertions.dart index 72d8e70fb2..6761f90d1e 100644 --- a/packages/flutter/lib/src/foundation/assertions.dart +++ b/packages/flutter/lib/src/foundation/assertions.dart @@ -676,7 +676,7 @@ class FlutterErrorDetails with Diagnosticable { 'provide substantially more information in this error message to help you determine ' 'and fix the underlying cause.\n' 'In either case, please report this assertion by filing a bug on GitHub:\n' - ' https://github.com/flutter/flutter/issues/new?template=2_bug.md' + ' https://github.com/flutter/flutter/issues/new?template=2_bug.md', )); } } @@ -802,14 +802,14 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti ErrorSummary('FlutterError is missing a summary.'), ErrorDescription( 'All FlutterError objects should start with a short (one line) ' - 'summary description of the problem that was detected.' + 'summary description of the problem that was detected.', ), DiagnosticsProperty('Malformed', this, expandableValue: true, showSeparator: false, style: DiagnosticsTreeStyle.whitespace), ErrorDescription( '\nThis error should still help you solve your problem, ' 'however please also report this malformed error in the ' 'framework by filing a bug on GitHub:\n' - ' https://github.com/flutter/flutter/issues/new?template=2_bug.md' + ' https://github.com/flutter/flutter/issues/new?template=2_bug.md', ), ], )); @@ -821,7 +821,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti ErrorDescription( 'All FlutterError objects should have only a single short ' '(one line) summary description of the problem that was ' - 'detected.' + 'detected.', ), DiagnosticsProperty('Malformed', this, expandableValue: true, showSeparator: false, style: DiagnosticsTreeStyle.whitespace), ErrorDescription('\nThe malformed error has ${summaries.length} summaries.'), @@ -835,7 +835,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti '\nThis error should still help you solve your problem, ' 'however please also report this malformed error in the ' 'framework by filing a bug on GitHub:\n' - ' https://github.com/flutter/flutter/issues/new?template=2_bug.md' + ' https://github.com/flutter/flutter/issues/new?template=2_bug.md', )); throw FlutterError.fromParts(message); } @@ -1065,7 +1065,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti final List where = [ for (MapEntry entry in removedPackagesAndClasses.entries) if (entry.value > 0) - entry.key + entry.key, ]..sort(); if (skipped == 1) { result.add('(elided one frame from ${where.single})'); diff --git a/packages/flutter/lib/src/foundation/change_notifier.dart b/packages/flutter/lib/src/foundation/change_notifier.dart index f44cacb6b9..ce7b7166f3 100644 --- a/packages/flutter/lib/src/foundation/change_notifier.dart +++ b/packages/flutter/lib/src/foundation/change_notifier.dart @@ -116,7 +116,7 @@ class ChangeNotifier implements Listenable { if (_listeners == null) { throw FlutterError( 'A $runtimeType was used after being disposed.\n' - 'Once you have called dispose() on a $runtimeType, it can no longer be used.' + 'Once you have called dispose() on a $runtimeType, it can no longer be used.', ); } return true; diff --git a/packages/flutter/lib/src/foundation/diagnostics.dart b/packages/flutter/lib/src/foundation/diagnostics.dart index e7f544fc0b..b6f0faa774 100644 --- a/packages/flutter/lib/src/foundation/diagnostics.dart +++ b/packages/flutter/lib/src/foundation/diagnostics.dart @@ -786,8 +786,8 @@ class _PrefixedStringBuilder { _PrefixedStringBuilder({ required this.prefixLineOne, required String? prefixOtherLines, - this.wrapWidth}) : - _prefixOtherLines = prefixOtherLines; + this.wrapWidth, + }) : _prefixOtherLines = prefixOtherLines; /// Prefix to add to the first line. final String prefixLineOne; @@ -1124,10 +1124,11 @@ class TextTreeRenderer { return ''; } else { return _debugRender( - node, - prefixLineOne: prefixLineOne, - prefixOtherLines: prefixOtherLines, - parentConfiguration: parentConfiguration); + node, + prefixLineOne: prefixLineOne, + prefixOtherLines: prefixOtherLines, + parentConfiguration: parentConfiguration, + ); } } @@ -1246,7 +1247,7 @@ class TextTreeRenderer { } final Iterable propertiesIterable = node.getProperties().where( - (DiagnosticsNode n) => !n.isFiltered(_minLevel) + (DiagnosticsNode n) => !n.isFiltered(_minLevel), ); List properties; if (_maxDescendentsTruncatableNode >= 0 && node.allowTruncate) { @@ -1657,8 +1658,7 @@ abstract class DiagnosticsNode { assert(minLevel != null); assert(() { if (_isSingleLine(style)) { - result = toStringDeep( - parentConfiguration: parentConfiguration, minLevel: minLevel); + result = toStringDeep(parentConfiguration: parentConfiguration, minLevel: minLevel); } else { final String description = toDescription(parentConfiguration: parentConfiguration)!; diff --git a/packages/flutter/lib/src/gestures/long_press.dart b/packages/flutter/lib/src/gestures/long_press.dart index 639c77898a..f408c0fda0 100644 --- a/packages/flutter/lib/src/gestures/long_press.dart +++ b/packages/flutter/lib/src/gestures/long_press.dart @@ -429,8 +429,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer { globalPosition: _longPressOrigin!.global, localPosition: _longPressOrigin!.local, ); - invokeCallback( - 'onSecondaryLongPressStart', () => onSecondaryLongPressStart!(details)); + invokeCallback('onSecondaryLongPressStart', () => onSecondaryLongPressStart!(details)); } if (onSecondaryLongPress != null) { invokeCallback('onSecondaryLongPress', onSecondaryLongPress!); @@ -442,8 +441,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer { globalPosition: _longPressOrigin!.global, localPosition: _longPressOrigin!.local, ); - invokeCallback( - 'onTertiaryLongPressStart', () => onTertiaryLongPressStart!(details)); + invokeCallback('onTertiaryLongPressStart', () => onTertiaryLongPressStart!(details)); } if (onTertiaryLongPress != null) { invokeCallback('onTertiaryLongPress', onTertiaryLongPress!); diff --git a/packages/flutter/lib/src/gestures/pointer_router.dart b/packages/flutter/lib/src/gestures/pointer_router.dart index daf09bf849..bab9b2d988 100644 --- a/packages/flutter/lib/src/gestures/pointer_router.dart +++ b/packages/flutter/lib/src/gestures/pointer_router.dart @@ -106,7 +106,7 @@ class PointerRouter { stack: stack, library: 'gesture library', context: ErrorDescription('while routing a pointer event'), - informationCollector: collector + informationCollector: collector, )); } } diff --git a/packages/flutter/lib/src/gestures/pointer_signal_resolver.dart b/packages/flutter/lib/src/gestures/pointer_signal_resolver.dart index 8ce9464149..7b7eadc9d2 100644 --- a/packages/flutter/lib/src/gestures/pointer_signal_resolver.dart +++ b/packages/flutter/lib/src/gestures/pointer_signal_resolver.dart @@ -210,7 +210,7 @@ class PointerSignalResolver { stack: stack, library: 'gesture library', context: ErrorDescription('while resolving a PointerSignalEvent'), - informationCollector: collector + informationCollector: collector, )); } _firstRegisteredCallback = null; diff --git a/packages/flutter/lib/src/gestures/recognizer.dart b/packages/flutter/lib/src/gestures/recognizer.dart index d9bd604980..92f4ab26d1 100644 --- a/packages/flutter/lib/src/gestures/recognizer.dart +++ b/packages/flutter/lib/src/gestures/recognizer.dart @@ -194,7 +194,7 @@ abstract class GestureRecognizer extends GestureArenaMember with DiagnosticableT stack: stack, library: 'gesture', context: ErrorDescription('while handling a gesture'), - informationCollector: collector + informationCollector: collector, )); } return result; diff --git a/packages/flutter/lib/src/gestures/team.dart b/packages/flutter/lib/src/gestures/team.dart index 724617cbe4..e2eee5573a 100644 --- a/packages/flutter/lib/src/gestures/team.dart +++ b/packages/flutter/lib/src/gestures/team.dart @@ -141,7 +141,9 @@ class GestureArenaTeam { /// [OneSequenceGestureRecognizer.team]. GestureArenaEntry add(int pointer, GestureArenaMember member) { final _CombiningGestureArenaMember combiner = _combiners.putIfAbsent( - pointer, () => _CombiningGestureArenaMember(this, pointer)); + pointer, + () => _CombiningGestureArenaMember(this, pointer), + ); return combiner._add(pointer, member); } } diff --git a/packages/flutter/lib/src/gestures/velocity_tracker.dart b/packages/flutter/lib/src/gestures/velocity_tracker.dart index 9fc1cf49dc..2e3a057b85 100644 --- a/packages/flutter/lib/src/gestures/velocity_tracker.dart +++ b/packages/flutter/lib/src/gestures/velocity_tracker.dart @@ -31,14 +31,12 @@ class Velocity { /// Return the difference of two velocities. Velocity operator -(Velocity other) { - return Velocity( - pixelsPerSecond: pixelsPerSecond - other.pixelsPerSecond); + return Velocity(pixelsPerSecond: pixelsPerSecond - other.pixelsPerSecond); } /// Return the sum of two velocities. Velocity operator +(Velocity other) { - return Velocity( - pixelsPerSecond: pixelsPerSecond + other.pixelsPerSecond); + return Velocity(pixelsPerSecond: pixelsPerSecond + other.pixelsPerSecond); } /// Return a velocity whose magnitude has been clamped to [minValue] @@ -149,7 +147,7 @@ class VelocityTracker { /// Create a new velocity tracker for a pointer [kind]. @Deprecated( 'Use VelocityTracker.withKind and provide the PointerDeviceKind associated with the gesture being tracked. ' - 'This feature was deprecated after v1.22.0-12.1.pre.' + 'This feature was deprecated after v1.22.0-12.1.pre.', ) VelocityTracker([this.kind = PointerDeviceKind.touch]); @@ -304,7 +302,7 @@ class IOSScrollViewFlingVelocityTracker extends VelocityTracker { return true; throw FlutterError( 'The position being added ($position) has a smaller timestamp ($time) ' - 'than its predecessor: $previousPoint.' + 'than its predecessor: $previousPoint.', ); }()); _index = (_index + 1) % _sampleSize;