add missing trailing commas (#79299)
This commit is contained in:
parent
8a3c09af60
commit
a6832d4d32
@ -128,7 +128,7 @@ Future<void> run(List<String> 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
|
||||
|
@ -446,7 +446,7 @@ class AnimationController extends Animation<double>
|
||||
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<double>
|
||||
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<double>
|
||||
'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<double>
|
||||
'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<double>
|
||||
'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;
|
||||
|
@ -443,7 +443,7 @@ class CurvedAnimation extends Animation<double> with AnimationWithParentMixin<do
|
||||
'Invalid curve endpoint at $t.\n'
|
||||
'Curves must map 0.0 to near zero and 1.0 to near one but '
|
||||
'${activeCurve.runtimeType} mapped $t to $transformedValue, which '
|
||||
'is near $roundedTransformedValue.'
|
||||
'is near $roundedTransformedValue.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -214,7 +214,7 @@ mixin AnimationLocalStatusListenersMixin {
|
||||
stack: stack,
|
||||
library: 'animation library',
|
||||
context: ErrorDescription('while notifying status listeners for $runtimeType'),
|
||||
informationCollector: collector
|
||||
informationCollector: collector,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ class Tween<T extends dynamic> extends Animatable<T> {
|
||||
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<T extends dynamic> extends Animatable<T> {
|
||||
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.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -1334,7 +1334,7 @@ class _RenderCupertinoAlertActions extends RenderBox
|
||||
}
|
||||
|
||||
return constraints.constrain(
|
||||
Size(constraints.maxWidth, verticalOffset)
|
||||
Size(constraints.maxWidth, verticalOffset),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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<CupertinoDatePicker> {
|
||||
}),
|
||||
looping: true,
|
||||
selectionOverlay: selectionOverlay,
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -1757,10 +1757,12 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
||||
setState(() {
|
||||
selectedHour = index;
|
||||
widget.onTimerDurationChanged(
|
||||
Duration(
|
||||
hours: selectedHour!,
|
||||
minutes: selectedMinute,
|
||||
seconds: selectedSecond ?? 0));
|
||||
Duration(
|
||||
hours: selectedHour!,
|
||||
minutes: selectedMinute,
|
||||
seconds: selectedSecond ?? 0,
|
||||
),
|
||||
);
|
||||
});
|
||||
},
|
||||
children: List<Widget>.generate(24, (int index) {
|
||||
@ -1810,7 +1812,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
||||
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<CupertinoTimerPicker> {
|
||||
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<Widget>.generate(60 ~/ widget.minuteInterval, (int index) {
|
||||
@ -1874,7 +1878,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
||||
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<CupertinoTimerPicker> {
|
||||
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<Widget>.generate(60 ~/ widget.secondInterval, (int index) {
|
||||
@ -1935,7 +1941,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
||||
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<CupertinoTimerPicker> {
|
||||
_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<CupertinoTimerPicker> {
|
||||
_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<CupertinoTimerPicker> {
|
||||
_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;
|
||||
|
@ -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;
|
||||
|
@ -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),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -848,7 +848,7 @@ class _CupertinoEdgeShadowDecoration extends Decoration {
|
||||
<Color>[
|
||||
for (int i = 0; i < b._colors!.length; i += 1)
|
||||
Color.lerp(a._colors?[i], b._colors?[i], t)!,
|
||||
]
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -365,12 +365,15 @@ class _CupertinoSearchTextFieldState extends State<CupertinoSearchTextField>
|
||||
);
|
||||
|
||||
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,
|
||||
);
|
||||
|
||||
|
@ -130,7 +130,7 @@ class _SegmentState<T> extends State<_Segment<T>> with TickerProviderStateMixin<
|
||||
highlightPressScaleAnimation = highlightPressScaleController.drive(
|
||||
Tween<double>(
|
||||
begin: highlightPressScaleAnimation.value,
|
||||
end: widget.shouldScaleContent ? _kMinThumbScale : 1.0
|
||||
end: widget.shouldScaleContent ? _kMinThumbScale : 1.0,
|
||||
),
|
||||
);
|
||||
highlightPressScaleController.animateWith(_kThumbSpringAnimationSimulation);
|
||||
@ -166,7 +166,7 @@ class _SegmentState<T> extends State<_Segment<T>> 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<T> extends State<CupertinoSlidingSegmentedControl<T
|
||||
Tween<double>(
|
||||
begin: thumbScaleAnimation.value,
|
||||
end: isExpanding ? 1 : _kMinThumbScale,
|
||||
)
|
||||
),
|
||||
);
|
||||
thumbScaleController.animateWith(_kThumbSpringAnimationSimulation);
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ class _CupertinoTabViewState extends State<CupertinoTabView> {
|
||||
' 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<CupertinoTabView> {
|
||||
'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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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!;
|
||||
|
@ -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<FlutterError>('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<FlutterError>('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<String> where = <String>[
|
||||
for (MapEntry<String, int> entry in removedPackagesAndClasses.entries)
|
||||
if (entry.value > 0)
|
||||
entry.key
|
||||
entry.key,
|
||||
]..sort();
|
||||
if (skipped == 1) {
|
||||
result.add('(elided one frame from ${where.single})');
|
||||
|
@ -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;
|
||||
|
@ -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<DiagnosticsNode> propertiesIterable = node.getProperties().where(
|
||||
(DiagnosticsNode n) => !n.isFiltered(_minLevel)
|
||||
(DiagnosticsNode n) => !n.isFiltered(_minLevel),
|
||||
);
|
||||
List<DiagnosticsNode> 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)!;
|
||||
|
||||
|
@ -429,8 +429,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer {
|
||||
globalPosition: _longPressOrigin!.global,
|
||||
localPosition: _longPressOrigin!.local,
|
||||
);
|
||||
invokeCallback<void>(
|
||||
'onSecondaryLongPressStart', () => onSecondaryLongPressStart!(details));
|
||||
invokeCallback<void>('onSecondaryLongPressStart', () => onSecondaryLongPressStart!(details));
|
||||
}
|
||||
if (onSecondaryLongPress != null) {
|
||||
invokeCallback<void>('onSecondaryLongPress', onSecondaryLongPress!);
|
||||
@ -442,8 +441,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer {
|
||||
globalPosition: _longPressOrigin!.global,
|
||||
localPosition: _longPressOrigin!.local,
|
||||
);
|
||||
invokeCallback<void>(
|
||||
'onTertiaryLongPressStart', () => onTertiaryLongPressStart!(details));
|
||||
invokeCallback<void>('onTertiaryLongPressStart', () => onTertiaryLongPressStart!(details));
|
||||
}
|
||||
if (onTertiaryLongPress != null) {
|
||||
invokeCallback<void>('onTertiaryLongPress', onTertiaryLongPress!);
|
||||
|
@ -106,7 +106,7 @@ class PointerRouter {
|
||||
stack: stack,
|
||||
library: 'gesture library',
|
||||
context: ErrorDescription('while routing a pointer event'),
|
||||
informationCollector: collector
|
||||
informationCollector: collector,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ class PointerSignalResolver {
|
||||
stack: stack,
|
||||
library: 'gesture library',
|
||||
context: ErrorDescription('while resolving a PointerSignalEvent'),
|
||||
informationCollector: collector
|
||||
informationCollector: collector,
|
||||
));
|
||||
}
|
||||
_firstRegisteredCallback = null;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user