mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
add missing trailing commas in packages/flutter (#41076)
This commit is contained in:
parent
dc2ae3f637
commit
e9965f5636
|
@ -227,7 +227,7 @@ class CupertinoDatePicker extends StatefulWidget {
|
|||
this.maximumYear,
|
||||
this.minuteInterval = 1,
|
||||
this.use24hFormat = false,
|
||||
this.backgroundColor = _kBackgroundColor
|
||||
this.backgroundColor = _kBackgroundColor,
|
||||
}) : initialDateTime = initialDateTime ?? DateTime.now(),
|
||||
assert(mode != null),
|
||||
assert(onDateTimeChanged != null),
|
||||
|
@ -1206,7 +1206,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
|||
for (String input in numbers) {
|
||||
textPainter.text = TextSpan(
|
||||
text: input,
|
||||
style: textStyle
|
||||
style: textStyle,
|
||||
);
|
||||
textPainter.layout();
|
||||
|
||||
|
@ -1218,7 +1218,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
|||
|
||||
textPainter.text = TextSpan(
|
||||
text: '$widestNumber$widestNumber',
|
||||
style: textStyle
|
||||
style: textStyle,
|
||||
);
|
||||
|
||||
textPainter.layout();
|
||||
|
@ -1251,7 +1251,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
|||
text,
|
||||
style: const TextStyle(
|
||||
fontSize: _kTimerPickerLabelFontSize,
|
||||
fontWeight: FontWeight.w600
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
maxLines: 1,
|
||||
softWrap: false,
|
||||
|
@ -1320,7 +1320,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
|||
),
|
||||
_buildLabel(
|
||||
localizations.timerPickerHourLabel(lastSelectedHour ?? selectedHour),
|
||||
additionalPadding
|
||||
additionalPadding,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -1474,14 +1474,14 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
|||
// Pad the widget to make it as wide as `_kPickerWidth`.
|
||||
columns = <Widget>[
|
||||
_buildHourColumn(const EdgeInsetsDirectional.only(start: paddingValue / 2, end: _kTimerPickerHalfColumnPadding)),
|
||||
_buildMinuteColumn(const EdgeInsetsDirectional.only(start: _kTimerPickerHalfColumnPadding, end: paddingValue / 2))
|
||||
_buildMinuteColumn(const EdgeInsetsDirectional.only(start: _kTimerPickerHalfColumnPadding, end: paddingValue / 2)),
|
||||
];
|
||||
break;
|
||||
case CupertinoTimerPickerMode.ms:
|
||||
// Pad the widget to make it as wide as `_kPickerWidth`.
|
||||
columns = <Widget>[
|
||||
_buildMinuteColumn(const EdgeInsetsDirectional.only(start: paddingValue / 2, end: _kTimerPickerHalfColumnPadding)),
|
||||
_buildSecondColumn(const EdgeInsetsDirectional.only(start: _kTimerPickerHalfColumnPadding, end: paddingValue / 2))
|
||||
_buildSecondColumn(const EdgeInsetsDirectional.only(start: _kTimerPickerHalfColumnPadding, end: paddingValue / 2)),
|
||||
];
|
||||
break;
|
||||
case CupertinoTimerPickerMode.hms:
|
||||
|
@ -1490,7 +1490,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
|||
columns = <Widget>[
|
||||
_buildHourColumn(const EdgeInsetsDirectional.only(start: paddingValue / 2, end: _kTimerPickerHalfColumnPadding)),
|
||||
_buildMinuteColumn(const EdgeInsetsDirectional.only(start: _kTimerPickerHalfColumnPadding, end: _kTimerPickerHalfColumnPadding)),
|
||||
_buildSecondColumn(const EdgeInsetsDirectional.only(start: _kTimerPickerHalfColumnPadding, end: paddingValue / 2))
|
||||
_buildSecondColumn(const EdgeInsetsDirectional.only(start: _kTimerPickerHalfColumnPadding, end: paddingValue / 2)),
|
||||
];
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1159,7 +1159,7 @@ class CupertinoDialogAction extends StatelessWidget {
|
|||
TextStyle style = _kCupertinoDialogActionStyle.copyWith(
|
||||
color: CupertinoDynamicColor.resolve(
|
||||
isDestructiveAction ? CupertinoSystemColors.of(context).systemRed : CupertinoSystemColors.of(context).systemBlue,
|
||||
context
|
||||
context,
|
||||
),
|
||||
);
|
||||
style = style.merge(textStyle);
|
||||
|
|
|
@ -231,7 +231,7 @@ class _CupertinoSliderState extends State<CupertinoSlider> with TickerProviderSt
|
|||
divisions: widget.divisions,
|
||||
activeColor: CupertinoDynamicColor.resolve(
|
||||
widget.activeColor ?? CupertinoTheme.of(context).primaryColor,
|
||||
context
|
||||
context,
|
||||
),
|
||||
onChanged: widget.onChanged != null ? _handleChanged : null,
|
||||
onChangeStart: widget.onChangeStart != null ? _handleDragStart : null,
|
||||
|
|
|
@ -201,7 +201,7 @@ class CupertinoTextField extends StatefulWidget {
|
|||
this.placeholder,
|
||||
this.placeholderStyle = const TextStyle(
|
||||
fontWeight: FontWeight.w300,
|
||||
color: _kInactiveTextColor
|
||||
color: _kInactiveTextColor,
|
||||
),
|
||||
this.prefix,
|
||||
this.prefixMode = OverlayVisibilityMode.always,
|
||||
|
|
|
@ -335,7 +335,7 @@ class _CupertinoTextSelectionControls extends TextSelectionControls {
|
|||
void addToolbarButtonIfNeeded(
|
||||
String text,
|
||||
bool Function(TextSelectionDelegate) predicate,
|
||||
void Function(TextSelectionDelegate) onPressed
|
||||
void Function(TextSelectionDelegate) onPressed,
|
||||
) {
|
||||
if (!predicate(delegate)) {
|
||||
return;
|
||||
|
|
|
@ -82,7 +82,7 @@ class CupertinoTheme extends StatelessWidget {
|
|||
child: IconTheme(
|
||||
data: IconThemeData(color: data.primaryColor),
|
||||
child: child,
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ class _NoDefaultCupertinoThemeData extends CupertinoThemeData {
|
|||
Color primaryContrastingColor,
|
||||
CupertinoTextThemeData textTheme,
|
||||
Color barBackgroundColor ,
|
||||
Color scaffoldBackgroundColor
|
||||
Color scaffoldBackgroundColor,
|
||||
}) {
|
||||
return _NoDefaultCupertinoThemeData(
|
||||
brightness ?? this.brightness,
|
||||
|
|
|
@ -252,7 +252,7 @@ class FlutterErrorDetailsForPointerEventDispatcher extends FlutterErrorDetails {
|
|||
library: library,
|
||||
context: context,
|
||||
informationCollector: informationCollector,
|
||||
silent: silent
|
||||
silent: silent,
|
||||
);
|
||||
|
||||
/// The pointer event that was being routed when the exception was raised.
|
||||
|
|
|
@ -136,7 +136,7 @@ class FlutterErrorDetailsForPointerRouter extends FlutterErrorDetails {
|
|||
library: library,
|
||||
context: context,
|
||||
informationCollector: informationCollector,
|
||||
silent: silent
|
||||
silent: silent,
|
||||
);
|
||||
|
||||
/// The pointer router that caught the exception.
|
||||
|
|
|
@ -189,7 +189,7 @@ abstract class GestureRecognizer extends GestureArenaMember with DiagnosticableT
|
|||
informationCollector: () sync* {
|
||||
yield StringProperty('Handler', name);
|
||||
yield DiagnosticsProperty<GestureRecognizer>('Recognizer', this, style: DiagnosticsTreeStyle.errorProperty);
|
||||
}
|
||||
},
|
||||
));
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -580,7 +580,7 @@ class _LicensePageState extends State<LicensePage> {
|
|||
child: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -391,7 +391,7 @@ class _ModalBottomSheetRoute<T> extends PopupRoute<T> {
|
|||
elevation: elevation,
|
||||
shape: shape,
|
||||
clipBehavior: clipBehavior,
|
||||
isScrollControlled: isScrollControlled
|
||||
isScrollControlled: isScrollControlled,
|
||||
),
|
||||
);
|
||||
if (theme != null)
|
||||
|
|
|
@ -1037,7 +1037,7 @@ class _DatePickerDialogState extends State<_DatePickerDialog> {
|
|||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
Flexible(child: picker),
|
||||
actions
|
||||
actions,
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -1066,7 +1066,7 @@ class DropdownButtonFormField<T> extends FormField<T> {
|
|||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
/// {@macro flutter.material.dropdownButton.onChanged}
|
||||
|
|
|
@ -464,7 +464,7 @@ class _ExpansionPanelListState extends State<ExpansionPanelList> {
|
|||
expandIconContainer = Semantics(
|
||||
label: _isChildExpanded(index)? localizations.expandedIconTapHint : localizations.collapsedIconTapHint,
|
||||
container: true,
|
||||
child: expandIconContainer
|
||||
child: expandIconContainer,
|
||||
);
|
||||
}
|
||||
Widget header = Row(
|
||||
|
|
|
@ -126,7 +126,7 @@ class RangeSlider extends StatefulWidget {
|
|||
this.labels,
|
||||
this.activeColor,
|
||||
this.inactiveColor,
|
||||
this.semanticFormatterCallback
|
||||
this.semanticFormatterCallback,
|
||||
}) : assert(values != null),
|
||||
assert(min != null),
|
||||
assert(max != null),
|
||||
|
@ -373,17 +373,17 @@ class _RangeSliderState extends State<RangeSlider> with TickerProviderStateMixin
|
|||
enableController = AnimationController(
|
||||
duration: enableAnimationDuration,
|
||||
vsync: this,
|
||||
value: widget.onChanged != null ? 1.0 : 0.0
|
||||
value: widget.onChanged != null ? 1.0 : 0.0,
|
||||
);
|
||||
startPositionController = AnimationController(
|
||||
duration: Duration.zero,
|
||||
vsync: this,
|
||||
value: _unlerp(widget.values.start)
|
||||
value: _unlerp(widget.values.start),
|
||||
);
|
||||
endPositionController = AnimationController(
|
||||
duration: Duration.zero,
|
||||
vsync: this,
|
||||
value: _unlerp(widget.values.end)
|
||||
value: _unlerp(widget.values.end),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1151,7 +1151,7 @@ class _RenderRangeSlider extends RenderBox {
|
|||
parentBox: this,
|
||||
offset: offset,
|
||||
sliderTheme: _sliderTheme,
|
||||
isDiscrete: isDiscrete
|
||||
isDiscrete: isDiscrete,
|
||||
);
|
||||
final Offset startThumbCenter = Offset(trackRect.left + startVisualPosition * trackRect.width, trackRect.center.dy);
|
||||
final Offset endThumbCenter = Offset(trackRect.left + endVisualPosition * trackRect.width, trackRect.center.dy);
|
||||
|
@ -1166,7 +1166,7 @@ class _RenderRangeSlider extends RenderBox {
|
|||
startThumbCenter: startThumbCenter,
|
||||
endThumbCenter: endThumbCenter,
|
||||
isDiscrete: isDiscrete,
|
||||
isEnabled: isEnabled
|
||||
isEnabled: isEnabled,
|
||||
);
|
||||
|
||||
if (!_overlayAnimation.isDismissed) {
|
||||
|
|
|
@ -339,7 +339,7 @@ class _BodyBuilder extends StatelessWidget {
|
|||
Key key,
|
||||
@required this.extendBody,
|
||||
@required this.extendBodyBehindAppBar,
|
||||
@required this.body
|
||||
@required this.body,
|
||||
}) : assert(extendBody != null),
|
||||
assert(extendBodyBehindAppBar != null),
|
||||
assert(body != null),
|
||||
|
@ -2139,7 +2139,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
|
|||
widget.body == null ? null : _BodyBuilder(
|
||||
extendBody: widget.extendBody,
|
||||
extendBodyBehindAppBar: widget.extendBodyBehindAppBar,
|
||||
body: widget.body
|
||||
body: widget.body,
|
||||
),
|
||||
_ScaffoldSlot.body,
|
||||
removeLeftPadding: false,
|
||||
|
@ -2450,7 +2450,7 @@ class _StandardBottomSheetState extends State<_StandardBottomSheet> {
|
|||
child: NotificationListener<DraggableScrollableNotification>(
|
||||
onNotification: extentChanged,
|
||||
child: bottomSheet,
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2463,7 +2463,7 @@ class _StandardBottomSheetState extends State<_StandardBottomSheet> {
|
|||
return Align(
|
||||
alignment: AlignmentDirectional.topStart,
|
||||
heightFactor: widget.animationController.value,
|
||||
child: child
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
child: _wrapBottomSheet(
|
||||
|
|
|
@ -2854,7 +2854,7 @@ typedef RangeThumbSelector = Thumb Function(
|
|||
double tapValue,
|
||||
Size thumbSize,
|
||||
Size trackSize,
|
||||
double dx
|
||||
double dx,
|
||||
);
|
||||
|
||||
/// Object for representing range slider thumb values.
|
||||
|
|
|
@ -153,7 +153,7 @@ class Theme extends StatelessWidget {
|
|||
data: data.iconTheme,
|
||||
child: child,
|
||||
),
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ class _DayPeriodControl extends StatelessWidget {
|
|||
heightFactor: 1,
|
||||
child: Semantics(
|
||||
selected: amSelected,
|
||||
child: Text(materialLocalizations.anteMeridiemAbbreviation, style: amStyle)
|
||||
child: Text(materialLocalizations.anteMeridiemAbbreviation, style: amStyle),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -467,9 +467,8 @@ class _MinuteControl extends StatelessWidget {
|
|||
_TimePickerHeaderFormat _buildHeaderFormat(
|
||||
TimeOfDayFormat timeOfDayFormat,
|
||||
_TimePickerFragmentContext context,
|
||||
Orientation orientation
|
||||
Orientation orientation,
|
||||
) {
|
||||
|
||||
// Creates an hour fragment.
|
||||
_TimePickerHeaderFragment hour() {
|
||||
return _TimePickerHeaderFragment(
|
||||
|
|
|
@ -913,9 +913,9 @@ class _SelectToggleButtonRenderObject extends RenderShiftedBox {
|
|||
this._borderRadius,
|
||||
this._isFirstButton,
|
||||
this._isLastButton,
|
||||
this._textDirection,
|
||||
[RenderBox child]
|
||||
) : super(child);
|
||||
this._textDirection, [
|
||||
RenderBox child,
|
||||
]) : super(child);
|
||||
|
||||
// The width and color of the button's leading side border.
|
||||
BorderSide get leadingBorderSide => _leadingBorderSide;
|
||||
|
|
|
@ -54,7 +54,7 @@ class InlineSpanSemanticsInformation {
|
|||
this.text, {
|
||||
this.isPlaceholder = false,
|
||||
this.semanticsLabel,
|
||||
this.recognizer
|
||||
this.recognizer,
|
||||
}) : assert(text != null),
|
||||
assert(isPlaceholder != null),
|
||||
assert(isPlaceholder == false || (text == '\uFFFC' && semanticsLabel == null && recognizer == null)),
|
||||
|
|
|
@ -96,7 +96,7 @@ mixin RendererBinding on BindingBase, ServicesBinding, SchedulerBinding, Gesture
|
|||
}
|
||||
debugCheckElevationsEnabled = value;
|
||||
return _forceRepaint();
|
||||
}
|
||||
},
|
||||
);
|
||||
registerSignalServiceExtension(
|
||||
name: 'debugDumpLayerTree',
|
||||
|
|
|
@ -1313,7 +1313,7 @@ abstract class RenderBox extends RenderObject {
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('The height argument to getMinIntrinsicWidth was null.'),
|
||||
ErrorDescription('The argument to getMinIntrinsicWidth must not be negative or null.'),
|
||||
ErrorHint('If you do not have a specific height in mind, then pass double.infinity instead.')
|
||||
ErrorHint('If you do not have a specific height in mind, then pass double.infinity instead.'),
|
||||
]);
|
||||
}
|
||||
if (height < 0.0) {
|
||||
|
@ -1454,7 +1454,7 @@ abstract class RenderBox extends RenderObject {
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('The height argument to getMaxIntrinsicWidth was null.'),
|
||||
ErrorDescription('The argument to getMaxIntrinsicWidth must not be negative or null.'),
|
||||
ErrorHint('If you do not have a specific height in mind, then pass double.infinity instead.')
|
||||
ErrorHint('If you do not have a specific height in mind, then pass double.infinity instead.'),
|
||||
]);
|
||||
}
|
||||
if (height < 0.0) {
|
||||
|
@ -1465,7 +1465,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'If you perform computations on another height before passing it to '
|
||||
'getMaxIntrinsicWidth, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -1532,7 +1532,7 @@ abstract class RenderBox extends RenderObject {
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('The width argument to getMinIntrinsicHeight was null.'),
|
||||
ErrorDescription('The argument to getMinIntrinsicHeight must not be negative or null.'),
|
||||
ErrorHint('If you do not have a specific width in mind, then pass double.infinity instead.')
|
||||
ErrorHint('If you do not have a specific width in mind, then pass double.infinity instead.'),
|
||||
]);
|
||||
}
|
||||
if (width < 0.0) {
|
||||
|
@ -1543,7 +1543,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'If you perform computations on another width before passing it to '
|
||||
'getMinIntrinsicHeight, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -1607,7 +1607,7 @@ abstract class RenderBox extends RenderObject {
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('The width argument to getMaxIntrinsicHeight was null.'),
|
||||
ErrorDescription('The argument to getMaxIntrinsicHeight must not be negative or null.'),
|
||||
ErrorHint('If you do not have a specific width in mind, then pass double.infinity instead.')
|
||||
ErrorHint('If you do not have a specific width in mind, then pass double.infinity instead.'),
|
||||
]);
|
||||
}
|
||||
if (width < 0.0) {
|
||||
|
@ -1618,7 +1618,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'If you perform computations on another width before passing it to '
|
||||
'getMaxIntrinsicHeight, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -1794,7 +1794,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'It is important to tell the framework if the size will be used or not '
|
||||
'as several important performance optimizations can be made if the '
|
||||
'size will not be used by the parent.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -1921,7 +1921,7 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorSummary('RenderBox did not set its size during layout.'),
|
||||
contract,
|
||||
ErrorDescription('It appears that this did not happen; layout completed, but the size property is still null.'),
|
||||
DiagnosticsProperty<RenderBox>('The RenderBox in question is', this, style: DiagnosticsTreeStyle.errorProperty)
|
||||
DiagnosticsProperty<RenderBox>('The RenderBox in question is', this, style: DiagnosticsTreeStyle.errorProperty),
|
||||
]);
|
||||
}
|
||||
// verify that the size is not infinite
|
||||
|
@ -1932,7 +1932,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'This probably means that it is a render object that tries to be '
|
||||
'as big as possible, but it was put inside another render object '
|
||||
'that allows its children to pick their own size.'
|
||||
)
|
||||
),
|
||||
];
|
||||
if (!constraints.hasBoundedWidth) {
|
||||
RenderBox node = this;
|
||||
|
@ -2055,7 +2055,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'RenderBox subclasses need to either override performLayout() to '
|
||||
'set a size and lay out any children, or, set sizedByParent to true '
|
||||
'so that performResize() sizes the render object.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -2103,7 +2103,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'to perform a hit test during the layout phase itself, make sure '
|
||||
'you only hit test nodes that have completed layout (e.g. the node\'s '
|
||||
'children, after their layout() method has been called).'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
|
@ -2194,7 +2194,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'Since $runtimeType does not in fact use that ParentData class for its children, it must '
|
||||
'provide an implementation of applyPaintTransform that supports the specific ParentData '
|
||||
'subclass used by its children (which apparently is ${child.parentData.runtimeType}).'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -254,7 +254,7 @@ mixin DebugOverflowIndicatorMixin on RenderObject {
|
|||
// handle a little more generically in GUI debugging clients in the
|
||||
// future.
|
||||
yield DiagnosticsNode.message('◢◤' * (FlutterError.wrapWidth ~/ 2), allowWrap: false);
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -713,7 +713,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
|||
ErrorDescription(
|
||||
'If none of the above helps enough to fix this problem, please don\'t hesitate to file a bug:\n'
|
||||
' https://github.com/flutter/flutter/issues/new?template=BUG.md'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}());
|
||||
totalFlex += childParentData.flex;
|
||||
|
@ -979,7 +979,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
|||
'than the available space, consider clipping it with a ClipRect widget '
|
||||
'before putting it in the flex, or using a scrollable container rather '
|
||||
'than a Flex, like a ListView.'
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
// Simulate a child rect that overflows by the right amount. This child
|
||||
|
|
|
@ -654,7 +654,7 @@ class ContainerLayer extends Layer {
|
|||
predecessor.toDiagnosticsNode(name: 'after layer', style: DiagnosticsTreeStyle.errorProperty),
|
||||
ErrorDescription('which occupies the same area at a higher elevation.'),
|
||||
];
|
||||
}
|
||||
},
|
||||
));
|
||||
return <PictureLayer>[
|
||||
_highlightConflictingLayer(predecessor),
|
||||
|
|
|
@ -1276,7 +1276,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||
// users. Inspector users can see the full tree by clicking on the
|
||||
// render object so this may not be that useful.
|
||||
yield describeForError('RenderObject', style: DiagnosticsTreeStyle.truncateChildren);
|
||||
}
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -2143,7 +2143,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||
ErrorDescription(
|
||||
'Since this typically indicates an infinite recursion, it is '
|
||||
'disallowed.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -2175,7 +2175,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||
),
|
||||
ErrorHint(
|
||||
'This usually indicates an error in the Flutter framework itself.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -2860,7 +2860,7 @@ mixin RenderObjectWithChildMixin<ChildType extends RenderObject> on RenderObject
|
|||
'was created by',
|
||||
child.debugCreator,
|
||||
style: DiagnosticsTreeStyle.errorProperty,
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -3235,7 +3235,7 @@ class FlutterErrorDetailsForRendering extends FlutterErrorDetails {
|
|||
library: library,
|
||||
context: context,
|
||||
informationCollector: informationCollector,
|
||||
silent: silent
|
||||
silent: silent,
|
||||
);
|
||||
|
||||
/// The RenderObject that was being processed when the exception was caught.
|
||||
|
@ -3779,11 +3779,11 @@ class _SemanticsGeometry {
|
|||
class DiagnosticsDebugCreator extends DiagnosticsProperty<Object> {
|
||||
/// Create a [DiagnosticsProperty] with its [value] initialized to input
|
||||
/// [RenderObject.debugCreator].
|
||||
DiagnosticsDebugCreator(Object value):
|
||||
assert(value != null),
|
||||
DiagnosticsDebugCreator(Object value)
|
||||
: assert(value != null),
|
||||
super(
|
||||
'debugCreator',
|
||||
value,
|
||||
level: DiagnosticLevel.hidden
|
||||
level: DiagnosticLevel.hidden,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -482,7 +482,7 @@ class RenderParagraph extends RenderBox
|
|||
BoxConstraints(
|
||||
maxWidth: constraints.maxWidth,
|
||||
),
|
||||
parentUsesSize: true
|
||||
parentUsesSize: true,
|
||||
);
|
||||
double baselineOffset;
|
||||
switch (_placeholderSpans[childIndex].alignment) {
|
||||
|
@ -516,7 +516,7 @@ class RenderParagraph extends RenderBox
|
|||
final TextParentData textParentData = child.parentData;
|
||||
textParentData.offset = Offset(
|
||||
_textPainter.inlinePlaceholderBoxes[childIndex].left,
|
||||
_textPainter.inlinePlaceholderBoxes[childIndex].top
|
||||
_textPainter.inlinePlaceholderBoxes[childIndex].top,
|
||||
);
|
||||
textParentData.scale = _textPainter.inlinePlaceholderScales[childIndex];
|
||||
child = childAfter(child);
|
||||
|
|
|
@ -1660,7 +1660,7 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> {
|
|||
child: child,
|
||||
elevation: elevation,
|
||||
color: color,
|
||||
shadowColor: shadowColor
|
||||
shadowColor: shadowColor,
|
||||
);
|
||||
|
||||
@override
|
||||
|
@ -1802,7 +1802,7 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase<Path> {
|
|||
color: color,
|
||||
shadowColor: shadowColor,
|
||||
clipper: clipper,
|
||||
clipBehavior: clipBehavior
|
||||
clipBehavior: clipBehavior,
|
||||
);
|
||||
|
||||
@override
|
||||
|
|
|
@ -421,7 +421,7 @@ class SliverConstraints extends Constraints {
|
|||
ErrorSummary('$runtimeType is not valid: $message'),
|
||||
if (informationCollector != null)
|
||||
...informationCollector(),
|
||||
DiagnosticsProperty<SliverConstraints>('The offending constraints were', this, style: DiagnosticsTreeStyle.errorProperty)
|
||||
DiagnosticsProperty<SliverConstraints>('The offending constraints were', this, style: DiagnosticsTreeStyle.errorProperty),
|
||||
]);
|
||||
}
|
||||
verify(axis != null, 'The "axis" is null.');
|
||||
|
@ -724,7 +724,7 @@ class SliverGeometry extends Diagnosticable {
|
|||
'The "maxPaintExtent" is less than the "paintExtent".',
|
||||
details:
|
||||
_debugCompareFloats('maxPaintExtent', maxPaintExtent, 'paintExtent', paintExtent)
|
||||
..add(ErrorDescription('By definition, a sliver can\'t paint more than the maximum that it can paint!'))
|
||||
..add(ErrorDescription('By definition, a sliver can\'t paint more than the maximum that it can paint!')),
|
||||
);
|
||||
}
|
||||
verify(hitTestExtent != null, 'The "hitTestExtent" is null.');
|
||||
|
|
|
@ -204,13 +204,15 @@ abstract class RenderSliverFixedExtentBoxAdaptor extends RenderSliverMultiBoxAda
|
|||
} else {
|
||||
// We will have to find it manually.
|
||||
int possibleFirstIndex = firstIndex - 1;
|
||||
while (possibleFirstIndex > 0 &&
|
||||
while (
|
||||
possibleFirstIndex > 0 &&
|
||||
!addInitialChild(
|
||||
index: possibleFirstIndex,
|
||||
layoutOffset: indexToLayoutOffset(itemExtent, possibleFirstIndex)
|
||||
)
|
||||
layoutOffset: indexToLayoutOffset(itemExtent, possibleFirstIndex),
|
||||
)
|
||||
) {
|
||||
possibleFirstIndex -= 1;
|
||||
}
|
||||
max = possibleFirstIndex * itemExtent;
|
||||
}
|
||||
geometry = SliverGeometry(
|
||||
|
@ -283,7 +285,7 @@ abstract class RenderSliverFixedExtentBoxAdaptor extends RenderSliverMultiBoxAda
|
|||
lastIndex: lastIndex,
|
||||
leadingScrollOffset: leadingScrollOffset,
|
||||
trailingScrollOffset: trailingScrollOffset,
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
final double paintExtent = calculatePaintOffset(
|
||||
|
|
|
@ -1366,7 +1366,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
|
|||
ErrorSummary('Failed to replace child semantics nodes because the list of `SemanticsNode`s was mutated.'),
|
||||
ErrorHint('Instead of mutating the existing list, create a new list containing the desired `SemanticsNode`s.'),
|
||||
ErrorDescription('Error details:'),
|
||||
...mutationErrors
|
||||
...mutationErrors,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ class TextSelection extends TextRange {
|
|||
this.isDirectional = false,
|
||||
}) : super(
|
||||
start: baseOffset < extentOffset ? baseOffset : extentOffset,
|
||||
end: baseOffset < extentOffset ? extentOffset : baseOffset
|
||||
end: baseOffset < extentOffset ? extentOffset : baseOffset,
|
||||
);
|
||||
|
||||
/// Creates a collapsed selection at the given offset.
|
||||
|
|
|
@ -520,7 +520,7 @@ class DraggableScrollableActuator extends StatelessWidget {
|
|||
/// The [child] parameter is required.
|
||||
DraggableScrollableActuator({
|
||||
Key key,
|
||||
@required this.child
|
||||
@required this.child,
|
||||
}) : super(key: key);
|
||||
|
||||
/// This child's [DraggableScrollableSheet] descendant will be reset when the
|
||||
|
|
|
@ -395,8 +395,8 @@ class EditableText extends StatefulWidget {
|
|||
copy: true,
|
||||
cut: true,
|
||||
paste: true,
|
||||
selectAll: true
|
||||
)
|
||||
selectAll: true,
|
||||
),
|
||||
}) : assert(controller != null),
|
||||
assert(focusNode != null),
|
||||
assert(obscureText != null),
|
||||
|
|
|
@ -171,7 +171,7 @@ abstract class GlobalKey<T extends State<StatefulWidget>> extends Key {
|
|||
'- $older\n'
|
||||
'- $newer\n'
|
||||
'A GlobalKey can only be specified on one widget at a time in the widget tree.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
|
@ -1133,7 +1133,7 @@ abstract class State<T extends StatefulWidget> extends Diagnosticable {
|
|||
'hasn\'t been inserted into the widget tree yet. It is not necessary to call '
|
||||
'setState() in the constructor, since the state is already assumed to be dirty '
|
||||
'when it is initially created.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -1151,7 +1151,7 @@ abstract class State<T extends StatefulWidget> extends Diagnosticable {
|
|||
'Instead of performing asynchronous work inside a call to setState(), first '
|
||||
'execute the work (without updating the widget state), and then synchronously '
|
||||
'update the state inside a call to setState().'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
// We ignore other types of return values so that you can do things like:
|
||||
|
@ -2197,7 +2197,7 @@ class BuildOwner {
|
|||
'If you did not attempt to call scheduleBuildFor() yourself, then this probably '
|
||||
'indicates a bug in the widgets framework. Please report it:\n'
|
||||
' https://github.com/flutter/flutter/issues/new?template=BUG.md'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -2212,7 +2212,7 @@ class BuildOwner {
|
|||
ErrorHint(
|
||||
'The BuildOwner.scheduleBuildFor() method should only be called while the '
|
||||
'buildScope() method is actively rebuilding the widget tree.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -2372,7 +2372,7 @@ class BuildOwner {
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('buildScope missed some dirty elements.'),
|
||||
ErrorHint('This probably indicates that the dirty list should have been resorted but was not.'),
|
||||
Element.describeElements('The list of dirty elements at the end of the buildScope call was', _dirtyElements)
|
||||
Element.describeElements('The list of dirty elements at the end of the buildScope call was', _dirtyElements),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -2501,7 +2501,7 @@ class BuildOwner {
|
|||
'due to GlobalKey reparenting $are:\n'
|
||||
'- ${elementLabels.join("\n ")}'
|
||||
'\nA GlobalKey can only be specified on one widget at a time in the widget tree.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -2824,7 +2824,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
'build because the child list is still being updated at that point, '
|
||||
'so the children might not be constructed yet, or might be old children '
|
||||
'that are going to be replaced.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}());
|
||||
visitChildren(visitor);
|
||||
|
@ -3043,7 +3043,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
parent.describeElement('The parent of the widgets with that key was'),
|
||||
element.describeElement('The first child to get instantiated with that key became'),
|
||||
DiagnosticsProperty<Widget>('The second child that was to be instantiated with that key was', widget, style: DiagnosticsTreeStyle.errorProperty),
|
||||
ErrorDescription('A GlobalKey can only be specified on one widget at a time in the widget tree.')
|
||||
ErrorDescription('A GlobalKey can only be specified on one widget at a time in the widget tree.'),
|
||||
]);
|
||||
}
|
||||
parent.owner._debugTrackElementThatWillNeedToBeRebuiltDueToGlobalKeyShenanigans(
|
||||
|
@ -3279,7 +3279,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
'active, which means it is part of the tree.\n'
|
||||
'Instead, this element is in the $_debugLifecycleState state.'
|
||||
),
|
||||
describeElement('The size getter was called for the following element')
|
||||
describeElement('The size getter was called for the following element'),
|
||||
]);
|
||||
}
|
||||
if (owner._debugBuilding) {
|
||||
|
@ -3301,7 +3301,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
'for more details.'
|
||||
),
|
||||
ErrorSpacer(),
|
||||
describeElement('The size getter was called for the following element')
|
||||
describeElement('The size getter was called for the following element'),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -3318,7 +3318,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
'too early in the pipeline (e.g., during the build phase) before the '
|
||||
'framework has created the render tree.'
|
||||
),
|
||||
describeElement('The size getter was called for the following element')
|
||||
describeElement('The size getter was called for the following element'),
|
||||
]);
|
||||
}
|
||||
if (renderObject is RenderSliver) {
|
||||
|
@ -3346,7 +3346,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
'and extracting its size manually.'
|
||||
),
|
||||
describeElement('The size getter was called for the following element'),
|
||||
renderObject.describeForError('The associated render object was')
|
||||
renderObject.describeForError('The associated render object was'),
|
||||
]);
|
||||
}
|
||||
final RenderBox box = renderObject;
|
||||
|
@ -3361,7 +3361,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
'the size and position of the render objects during layout.'
|
||||
),
|
||||
describeElement('The size getter was called for the following element'),
|
||||
box.describeForError('The render object from which the size was to be obtained was')
|
||||
box.describeForError('The render object from which the size was to be obtained was'),
|
||||
]);
|
||||
}
|
||||
if (box.debugNeedsLayout) {
|
||||
|
@ -3406,7 +3406,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
'To safely refer to a widget\'s ancestor in its dispose() method, '
|
||||
'save a reference to the ancestor by calling inheritFromWidgetOfExactType() '
|
||||
'in the widget\'s didChangeDependencies() method.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -3534,7 +3534,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
' * file I/O event\n'
|
||||
' * timer\n'
|
||||
' * microtask (caused by Future.then, async/await, scheduleMicrotask)'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -3673,7 +3673,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
),
|
||||
describeElement(
|
||||
'The widget on which setState() or markNeedsBuild() was called was',
|
||||
)
|
||||
),
|
||||
];
|
||||
if (owner._debugCurrentBuildTarget != null)
|
||||
information.add(owner._debugCurrentBuildTarget.describeWidget('The widget which was currently being built when the offending call was made was'));
|
||||
|
@ -3688,7 +3688,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||
'This ${widget.runtimeType} widget cannot be marked as needing to build '
|
||||
'because the framework is locked.'
|
||||
),
|
||||
describeElement('The widget on which setState() or markNeedsBuild() was called was')
|
||||
describeElement('The widget on which setState() or markNeedsBuild() was called was'),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -4024,7 +4024,7 @@ class StatefulElement extends ComponentElement {
|
|||
'The createState function for ${widget.runtimeType} returned a state '
|
||||
'of type ${_state.runtimeType}, which is not a subtype of '
|
||||
'State<${widget.runtimeType}>, violating the contract for createState.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -4067,7 +4067,7 @@ class StatefulElement extends ComponentElement {
|
|||
ErrorHint(
|
||||
'Rather than awaiting on asynchronous work directly inside of initState, '
|
||||
'call a separate method to do this work without awaiting it.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -4102,7 +4102,7 @@ class StatefulElement extends ComponentElement {
|
|||
ErrorHint(
|
||||
'Rather than awaiting on asynchronous work directly inside of didUpdateWidget, '
|
||||
'call a separate method to do this work without awaiting it.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -4141,7 +4141,7 @@ class StatefulElement extends ComponentElement {
|
|||
ErrorDescription(
|
||||
'dispose() implementations must always call their superclass dispose() method, to ensure '
|
||||
'that all the resources used by the widget are fully released.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}());
|
||||
_state._element = null;
|
||||
|
@ -4167,7 +4167,7 @@ class StatefulElement extends ComponentElement {
|
|||
'Typically references to inherited widgets should occur in widget build() methods. Alternatively, '
|
||||
'initialization based on inherited widgets can be placed in the didChangeDependencies method, which '
|
||||
'is called after initState and whenever the dependencies change thereafter.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
if (state._debugLifecycleState == _StateLifecycle.defunct) {
|
||||
|
|
|
@ -395,7 +395,7 @@ class _HeroState extends State<Hero> {
|
|||
child: TickerMode(
|
||||
enabled: !showPlaceholder,
|
||||
child: KeyedSubtree(key: _key, child: widget.child),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ class _CaptureAll extends StatelessWidget {
|
|||
const _CaptureAll({
|
||||
Key key,
|
||||
@required this.themes,
|
||||
@required this.child
|
||||
@required this.child,
|
||||
}) : assert(themes != null), assert(child != null), super(key: key);
|
||||
|
||||
final List<InheritedTheme> themes;
|
||||
|
|
|
@ -501,7 +501,7 @@ class _AndroidViewState extends State<AndroidView> {
|
|||
creationParamsCodec: widget.creationParamsCodec,
|
||||
onFocus: () {
|
||||
_focusNode.requestFocus();
|
||||
}
|
||||
},
|
||||
);
|
||||
if (widget.onPlatformViewCreated != null) {
|
||||
_controller.addOnPlatformViewCreatedListener(widget.onPlatformViewCreated);
|
||||
|
|
|
@ -213,7 +213,7 @@ class ScrollbarPainter extends ChangeNotifier implements CustomPainter {
|
|||
|
||||
final double thumbExtent = math.max(
|
||||
math.min(_trackExtent, minOverscrollLength),
|
||||
_trackExtent * fractionVisible
|
||||
_trackExtent * fractionVisible,
|
||||
);
|
||||
|
||||
final double fractionOverscrolled = 1.0 - _lastMetrics.extentInside / _lastMetrics.viewportDimension;
|
||||
|
|
|
@ -1098,7 +1098,7 @@ class TextSelectionGestureDetectorBuilder {
|
|||
Widget buildGestureDetector({
|
||||
Key key,
|
||||
HitTestBehavior behavior,
|
||||
Widget child
|
||||
Widget child,
|
||||
}) {
|
||||
return TextSelectionGestureDetector(
|
||||
key: key,
|
||||
|
|
|
@ -247,7 +247,7 @@ void main() {
|
|||
color: bgColor,
|
||||
disabledColor: inactive,
|
||||
onPressed: () { },
|
||||
))
|
||||
)),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -265,7 +265,7 @@ void main() {
|
|||
color: bgColor,
|
||||
disabledColor: inactive,
|
||||
onPressed: null,
|
||||
))
|
||||
)),
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import '../rendering/mock_canvas.dart';
|
|||
class DependentWidget extends StatelessWidget {
|
||||
const DependentWidget({
|
||||
Key key,
|
||||
this.color
|
||||
this.color,
|
||||
}) : super(key: key);
|
||||
|
||||
final Color color;
|
||||
|
@ -110,7 +110,7 @@ void main() {
|
|||
darkHighContrastColor: color5,
|
||||
highContrastElevatedColor: color6,
|
||||
darkHighContrastElevatedColor: color7,
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
expect(notSoDynamicColor1, isNot(vibrancyDependentColor1));
|
||||
|
@ -139,7 +139,7 @@ void main() {
|
|||
'elevatedColor = Color(0xff000002), '
|
||||
'darkElevatedColor = Color(0xff000004), '
|
||||
'highContrastElevatedColor = Color(0xff000006), '
|
||||
'darkHighContrastElevatedColor = Color(0xff000007))'
|
||||
'darkHighContrastElevatedColor = Color(0xff000007))',
|
||||
);
|
||||
expect(notSoDynamicColor1.toString(), 'CupertinoDynamicColor(*color = Color(0xff000000)*)');
|
||||
expect(vibrancyDependentColor1.toString(), 'CupertinoDynamicColor(*color = Color(0xff000001)*, darkColor = Color(0xff000000))');
|
||||
|
@ -656,11 +656,11 @@ void main() {
|
|||
group('CupertinoSystemColors', () {
|
||||
const Color dynamicColor0 = CupertinoDynamicColor.withBrightness(
|
||||
color: Color(0x00000000),
|
||||
darkColor: Color(0x00000000)
|
||||
darkColor: Color(0x00000000),
|
||||
);
|
||||
const Color dynamicColor1 = CupertinoDynamicColor.withBrightness(
|
||||
color: Color(0x00000001),
|
||||
darkColor: Color(0x00000000)
|
||||
darkColor: Color(0x00000000),
|
||||
);
|
||||
|
||||
const CupertinoSystemColorsData system0 = CupertinoSystemColorsData(
|
||||
|
|
|
@ -356,7 +356,7 @@ void main() {
|
|||
onDateTimeChanged: (DateTime d) => newDateTime = d,
|
||||
initialDateTime: DateTime(2018, 10, 10, 10, 3),
|
||||
minuteInterval: 3,
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
@ -887,7 +887,7 @@ void main() {
|
|||
mode: CupertinoDatePickerMode.dateAndTime,
|
||||
initialDateTime: DateTime(2019, 1, 1, 4),
|
||||
onDateTimeChanged: (_) {},
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
@ -914,7 +914,7 @@ void main() {
|
|||
initialDateTime: DateTime(2019, 1, 1, 4),
|
||||
onDateTimeChanged: (_) {},
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
@ -963,7 +963,7 @@ void main() {
|
|||
initialTimerDuration: const Duration(hours: 23, minutes: 59),
|
||||
onTimerDurationChanged: (_) {},
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -232,7 +232,7 @@ void main() {
|
|||
tabBar: CupertinoTabBar(
|
||||
items: List<BottomNavigationBarItem>.generate(
|
||||
10,
|
||||
(int i) => BottomNavigationBarItem(icon: const ImageIcon(TestImageProvider(24, 23)), title: Text('$i'))
|
||||
(int i) => BottomNavigationBarItem(icon: const ImageIcon(TestImageProvider(24, 23)), title: Text('$i')),
|
||||
),
|
||||
),
|
||||
tabBuilder: (BuildContext context, int index) => const Text('content'),
|
||||
|
|
|
@ -981,7 +981,7 @@ void main() {
|
|||
await tester.pump(const Duration(milliseconds: 500));
|
||||
|
||||
expect(find.widgetWithText(CupertinoButton, 'An iPod'), findsOneWidget);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets(
|
||||
|
@ -1036,7 +1036,7 @@ void main() {
|
|||
expect(find.text('A Phone'), findsOneWidget);
|
||||
// Custom onPressed called.
|
||||
expect(backPressed, true);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('textScaleFactor is set to 1.0', (WidgetTester tester) async {
|
||||
|
|
|
@ -456,7 +456,7 @@ void main() {
|
|||
expect(e, error);
|
||||
expect(errorCount, 0);
|
||||
errorCount++;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
debugDefaultTargetPlatformOverride = null;
|
||||
|
|
|
@ -126,7 +126,7 @@ void main() {
|
|||
textDirection: TextDirection.ltr,
|
||||
child: MediaQuery(
|
||||
data: MediaQueryData(viewInsets: EdgeInsets.only(bottom: 20.0)),
|
||||
child: child
|
||||
child: child,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
|
|
@ -138,7 +138,7 @@ void main() {
|
|||
segmentedControlRect.topLeft.translate(
|
||||
effectivePadding.topLeft.dx,
|
||||
effectivePadding.topLeft.dy,
|
||||
)
|
||||
),
|
||||
);
|
||||
expect(
|
||||
tester.getBottomLeft(find.byWidget(children[0])),
|
||||
|
|
|
@ -425,7 +425,7 @@ void main() {
|
|||
dragStartBehavior: DragStartBehavior.down,
|
||||
onChanged: null,
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -443,7 +443,7 @@ void main() {
|
|||
dragStartBehavior: DragStartBehavior.down,
|
||||
onChanged: (bool newValue) {},
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -461,7 +461,7 @@ void main() {
|
|||
dragStartBehavior: DragStartBehavior.down,
|
||||
onChanged: (bool newValue) {},
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -474,7 +474,7 @@ void main() {
|
|||
dragStartBehavior: DragStartBehavior.down,
|
||||
onChanged: null,
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -492,7 +492,7 @@ void main() {
|
|||
dragStartBehavior: DragStartBehavior.down,
|
||||
onChanged: null,
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -505,7 +505,7 @@ void main() {
|
|||
dragStartBehavior: DragStartBehavior.down,
|
||||
onChanged: (bool newValue) {},
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ void main() {
|
|||
tabBuilder: (BuildContext context, int index) {
|
||||
return const Placeholder();
|
||||
},
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
|
@ -452,7 +452,7 @@ void main() {
|
|||
data: const MediaQueryData(
|
||||
viewInsets: EdgeInsets.only(bottom: 20.0),
|
||||
),
|
||||
child: child
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -739,7 +739,7 @@ void main() {
|
|||
items: List<BottomNavigationBarItem>.generate(3, tabGenerator),
|
||||
),
|
||||
controller: controller,
|
||||
tabBuilder: (BuildContext context, int index) => const Placeholder()
|
||||
tabBuilder: (BuildContext context, int index) => const Placeholder(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -756,7 +756,7 @@ void main() {
|
|||
items: List<BottomNavigationBarItem>.generate(2, tabGenerator),
|
||||
),
|
||||
controller: controller,
|
||||
tabBuilder: (BuildContext context, int index) => const Placeholder()
|
||||
tabBuilder: (BuildContext context, int index) => const Placeholder(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -867,7 +867,7 @@ void main() {
|
|||
onPaint: () => tabsPainted0.add(index)
|
||||
)
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
]
|
||||
)
|
||||
|
@ -1041,7 +1041,7 @@ void main() {
|
|||
tabBar: CupertinoTabBar(
|
||||
items: List<BottomNavigationBarItem>.generate(
|
||||
10,
|
||||
(int i) => BottomNavigationBarItem(icon: const ImageIcon(TestImageProvider(24, 23)), title: Text('$i'))
|
||||
(int i) => BottomNavigationBarItem(icon: const ImageIcon(TestImageProvider(24, 23)), title: Text('$i')),
|
||||
),
|
||||
),
|
||||
tabBuilder: (BuildContext context, int index) => const Text('content'),
|
||||
|
|
|
@ -605,7 +605,7 @@ void main() {
|
|||
),
|
||||
placeholderStyle: TextStyle(
|
||||
color: Color(0xAAFFFFFF),
|
||||
fontWeight: FontWeight.w600
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -2741,7 +2741,7 @@ void main() {
|
|||
toolbarTopLeft = tester.getTopLeft(find.text('Paste'));
|
||||
textFieldTopLeft = tester.getTopLeft(find.byType(CupertinoTextField));
|
||||
expect(toolbarTopLeft.dy, lessThan(textFieldTopLeft.dy));
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('text field respects keyboardAppearance from theme', (WidgetTester tester) async {
|
||||
|
@ -2927,7 +2927,7 @@ void main() {
|
|||
enabled: false,
|
||||
),
|
||||
)
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -3035,7 +3035,7 @@ void main() {
|
|||
state = tester.state<EditableTextState>(find.byType(EditableText));
|
||||
state.renderEditable.selectPositionAt(
|
||||
from: tester.getTopRight(find.byType(CupertinoApp)),
|
||||
cause: SelectionChangedCause.tap
|
||||
cause: SelectionChangedCause.tap,
|
||||
);
|
||||
expect(state.showToolbar(), true);
|
||||
await tester.pumpAndSettle();
|
||||
|
@ -3096,7 +3096,7 @@ void main() {
|
|||
state = tester.state<EditableTextState>(find.byType(EditableText));
|
||||
state.renderEditable.selectPositionAt(
|
||||
from: tester.getCenter(find.byType(EditableText)),
|
||||
cause: SelectionChangedCause.tap
|
||||
cause: SelectionChangedCause.tap,
|
||||
);
|
||||
expect(state.showToolbar(), true);
|
||||
await tester.pumpAndSettle();
|
||||
|
@ -3167,7 +3167,7 @@ void main() {
|
|||
state.renderEditable.selectPositionAt(
|
||||
from: textOffsetToPosition(tester, 0),
|
||||
to: textOffsetToPosition(tester, 4),
|
||||
cause: SelectionChangedCause.tap
|
||||
cause: SelectionChangedCause.tap,
|
||||
);
|
||||
expect(state.showToolbar(), true);
|
||||
await tester.pumpAndSettle();
|
||||
|
@ -3238,7 +3238,7 @@ void main() {
|
|||
state.renderEditable.selectPositionAt(
|
||||
from: textOffsetToPosition(tester, 0),
|
||||
to: textOffsetToPosition(tester, 10),
|
||||
cause: SelectionChangedCause.tap
|
||||
cause: SelectionChangedCause.tap,
|
||||
);
|
||||
expect(state.showToolbar(), true);
|
||||
await tester.pumpAndSettle();
|
||||
|
|
|
@ -56,7 +56,7 @@ void main() {
|
|||
'MESSAGE\n'
|
||||
'\n'
|
||||
'INFO\n'
|
||||
'═════════════════════════════════════════════════════════════════\n'
|
||||
'═════════════════════════════════════════════════════════════════\n',
|
||||
|
||||
);
|
||||
expect(
|
||||
|
@ -87,7 +87,7 @@ void main() {
|
|||
'MESSAGE\n'
|
||||
'\n'
|
||||
'INFO\n'
|
||||
'═════════════════════════════════════════════════════════════════\n'
|
||||
'═════════════════════════════════════════════════════════════════\n',
|
||||
);
|
||||
expect(
|
||||
FlutterErrorDetails(
|
||||
|
@ -111,14 +111,14 @@ void main() {
|
|||
'══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞══════════════════════\n'
|
||||
'The following message was thrown:\n'
|
||||
'MESSAGE\n'
|
||||
'═════════════════════════════════════════════════════════════════\n'
|
||||
'═════════════════════════════════════════════════════════════════\n',
|
||||
);
|
||||
expect(
|
||||
const FlutterErrorDetails().toString(),
|
||||
'══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞══════════════════════\n'
|
||||
'The following Null object was thrown:\n'
|
||||
' null\n'
|
||||
'═════════════════════════════════════════════════════════════════\n'
|
||||
'═════════════════════════════════════════════════════════════════\n',
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -154,7 +154,7 @@ void main() {
|
|||
'FlutterError\n'
|
||||
' My Error Summary.\n'
|
||||
' My first description.\n'
|
||||
' My second description.\n'
|
||||
' My second description.\n',
|
||||
);
|
||||
|
||||
error = FlutterError(
|
||||
|
@ -180,7 +180,7 @@ void main() {
|
|||
' My first description.\n'
|
||||
' My second description.\n'
|
||||
'\n'
|
||||
'\n'
|
||||
'\n',
|
||||
);
|
||||
|
||||
error = FlutterError(
|
||||
|
@ -205,7 +205,7 @@ void main() {
|
|||
' My Error Summary.\n'
|
||||
' My first description.\n'
|
||||
'\n'
|
||||
' My second description.\n'
|
||||
' My second description.\n',
|
||||
);
|
||||
error = FlutterError('My Error Summary.');
|
||||
expect(error.diagnostics.length, 1);
|
||||
|
@ -215,7 +215,7 @@ void main() {
|
|||
expect(
|
||||
error.toStringDeep(),
|
||||
'FlutterError\n'
|
||||
' My Error Summary.\n'
|
||||
' My Error Summary.\n',
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ void main() {
|
|||
includeProperties: true,
|
||||
propertyFilter: (List<DiagnosticsNode> nodes, DiagnosticsNode owner) {
|
||||
return nodes.whereType<StringProperty>().toList();
|
||||
}
|
||||
},
|
||||
));
|
||||
final List<Map<String, Object>> properties = result['properties'];
|
||||
expect(properties, hasLength(3));
|
||||
|
@ -152,7 +152,7 @@ void main() {
|
|||
return <DiagnosticsNode>[
|
||||
StringProperty('foo', 'bar'),
|
||||
];
|
||||
}
|
||||
},
|
||||
));
|
||||
final List<Map<String, Object>> properties = result['properties'];
|
||||
expect(properties, hasLength(1));
|
||||
|
@ -164,7 +164,7 @@ void main() {
|
|||
subtreeDepth: 1,
|
||||
childFilter: (List<DiagnosticsNode> nodes, DiagnosticsNode owner) {
|
||||
return nodes.where((DiagnosticsNode node) => node.getProperties().isEmpty).toList();
|
||||
}
|
||||
},
|
||||
));
|
||||
final List<Map<String, Object>> children = result['children'];
|
||||
expect(children, hasLength(1));
|
||||
|
@ -175,7 +175,7 @@ void main() {
|
|||
subtreeDepth: 1,
|
||||
childFilter: (List<DiagnosticsNode> nodes, DiagnosticsNode owner) {
|
||||
return nodes.expand((DiagnosticsNode node) => node.getChildren()).toList();
|
||||
}
|
||||
},
|
||||
));
|
||||
final List<Map<String, Object>> children = result['children'];
|
||||
expect(children, hasLength(3));
|
||||
|
@ -188,7 +188,7 @@ void main() {
|
|||
includeProperties: true,
|
||||
nodeTruncator: (List<DiagnosticsNode> nodes, DiagnosticsNode owner) {
|
||||
return nodes.take(2).toList();
|
||||
}
|
||||
},
|
||||
));
|
||||
final List<Map<String, Object>> children = result['children'];
|
||||
expect(children, hasLength(3));
|
||||
|
@ -205,7 +205,7 @@ void main() {
|
|||
includeProperties: true,
|
||||
nodeDelegator: (DiagnosticsNode node, DiagnosticsSerializationDelegate delegate) {
|
||||
return delegate.copyWith(includeProperties: false);
|
||||
}
|
||||
},
|
||||
));
|
||||
final List<Map<String, Object>> properties = result['properties'];
|
||||
expect(properties, hasLength(7));
|
||||
|
|
|
@ -1861,7 +1861,7 @@ void main() {
|
|||
'#0 someMethod() file:///diagnostics_test.dart:42:19\n'
|
||||
'#1 someMethod2() file:///diagnostics_test.dart:12:3\n'
|
||||
'#2 someMethod3() file:///foo.dart:4:1\n'
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
expect(
|
||||
|
@ -1871,7 +1871,7 @@ void main() {
|
|||
'#0 someMethod() file:///diagnostics_test.dart:42:19\n'
|
||||
'#1 someMethod2() file:///diagnostics_test.dart:12:3\n'
|
||||
'#2 someMethod3() file:///foo.dart:4:1\n'
|
||||
)
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -2059,7 +2059,7 @@ void main() {
|
|||
'diagnosis: insufficient data to draw\n'
|
||||
' conclusion (less than five repaints)\n'
|
||||
'════════════════════════════════════════\n',
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
// This output looks ugly but verifies that no indentation on word wrap
|
||||
|
@ -2132,7 +2132,7 @@ void main() {
|
|||
' --- example property at max length --\n'
|
||||
' diagnosis: insufficient data to draw\n'
|
||||
' conclusion (less than five repaints)\n'
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
// This case matches the styles that should generally be used for error
|
||||
|
@ -2207,7 +2207,7 @@ void main() {
|
|||
' insufficient data to draw conclusion\n'
|
||||
' (less than five repaints)\n'
|
||||
'════════════════════════════════════════\n'
|
||||
)
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ Future<void> main() async {
|
|||
informationCollector: () sync* {
|
||||
yield ErrorDescription('line 1 of extra information');
|
||||
yield ErrorDescription('line 2 of extra information\n'); // the trailing newlines here are intentional
|
||||
}
|
||||
},
|
||||
));
|
||||
expect(console.join('\n'), matches(
|
||||
'^══╡ EXCEPTION CAUGHT BY ERROR HANDLING TEST ╞═══════════════════════════════════════════════════════\n'
|
||||
|
|
|
@ -214,7 +214,7 @@ void main() {
|
|||
Map<String, dynamic> result;
|
||||
binding.testExtension(
|
||||
'debugCheckElevationsEnabled',
|
||||
<String, String>{'enabled': '$newValue'}
|
||||
<String, String>{'enabled': '$newValue'},
|
||||
).then((Map<String, dynamic> answer) => result = answer);
|
||||
await binding.flushMicrotasks();
|
||||
expect(binding.frameScheduled, lastValue != newValue);
|
||||
|
|
|
@ -25,7 +25,7 @@ void main() {
|
|||
width: 100,
|
||||
height: 150,
|
||||
color: Colors.red,
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
@ -69,7 +69,7 @@ void main() {
|
|||
width: 500,
|
||||
height: 500,
|
||||
color: Colors.red,
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -39,7 +39,7 @@ void main() {
|
|||
width: 100,
|
||||
height: 150,
|
||||
color: Colors.red,
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
@ -87,7 +87,7 @@ void main() {
|
|||
width: 100,
|
||||
height: 150,
|
||||
color: Colors.red,
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
@ -162,7 +162,7 @@ void main() {
|
|||
width: 100,
|
||||
height: 150,
|
||||
color: Colors.red,
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -35,7 +35,7 @@ void main() {
|
|||
width: 100,
|
||||
height: 150,
|
||||
color: Colors.red,
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
@ -78,7 +78,7 @@ void main() {
|
|||
width: 100,
|
||||
height: 150,
|
||||
color: Colors.red,
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
@ -141,7 +141,7 @@ void main() {
|
|||
width: 100,
|
||||
height: 150,
|
||||
color: Colors.red,
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -1677,7 +1677,7 @@ EdgeInsets _itemPadding(WidgetTester tester, IconData icon) {
|
|||
return tester.widget<Padding>(
|
||||
find.descendant(
|
||||
of: find.ancestor(of: find.byIcon(icon), matching: find.byType(InkResponse)),
|
||||
matching: find.byType(Padding)
|
||||
matching: find.byType(Padding),
|
||||
).first,
|
||||
).padding.resolve(TextDirection.ltr);
|
||||
}
|
||||
|
|
|
@ -309,7 +309,7 @@ void main() {
|
|||
await tester.pumpWidget(MaterialApp(
|
||||
home: Scaffold(
|
||||
key: scaffoldKey,
|
||||
body: const Center(child: Text('body'))
|
||||
body: const Center(child: Text('body')),
|
||||
)
|
||||
));
|
||||
|
||||
|
@ -380,7 +380,7 @@ void main() {
|
|||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.style),
|
||||
title: Text('Item 2'),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -409,7 +409,7 @@ void main() {
|
|||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.style),
|
||||
title: Text('Item 2'),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -447,7 +447,7 @@ class _TestPage extends StatelessWidget {
|
|||
builder: (_) => const Text('Modal bottom sheet'),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ void main() {
|
|||
'backgroundColor: Color(0xffffffff)',
|
||||
'elevation: 2.0',
|
||||
'shape: RoundedRectangleBorder(BorderSide(Color(0xff000000), 0.0, BorderStyle.none), BorderRadius.circular(2.0))',
|
||||
'clipBehavior: Clip.antiAlias'
|
||||
'clipBehavior: Clip.antiAlias',
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ void main() {
|
|||
capturedContext = context;
|
||||
return Container();
|
||||
}
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
expect(ButtonBarTheme.of(capturedContext), equals(buttonBarTheme));
|
||||
|
@ -141,7 +141,7 @@ void main() {
|
|||
),
|
||||
);
|
||||
}
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
expect(ButtonBarTheme.of(capturedContext), equals(buttonBarTheme));
|
||||
|
|
|
@ -170,7 +170,7 @@ Future<void> _pumpCheckmarkChip(
|
|||
child: chip,
|
||||
);
|
||||
},
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
|
||||
test('light scheme matches the spec', () {
|
||||
// Colors should match the The Material Design baseline default theme:
|
||||
// https://material.io/design/color/dark-theme.html#ui-application
|
||||
|
@ -44,5 +43,4 @@ void main() {
|
|||
expect(scheme.onError, const Color(0xff000000));
|
||||
expect(scheme.brightness, Brightness.dark);
|
||||
});
|
||||
|
||||
}
|
|
@ -10,7 +10,7 @@ class SimpleExpansionPanelListTestWidget extends StatefulWidget {
|
|||
Key key,
|
||||
this.firstPanelKey,
|
||||
this.secondPanelKey,
|
||||
this.canTapOnHeader = false
|
||||
this.canTapOnHeader = false,
|
||||
}) : super(key: key);
|
||||
|
||||
final Key firstPanelKey;
|
||||
|
|
|
@ -105,7 +105,7 @@ void main() {
|
|||
highlightColor: const Color(0xf00fffff),
|
||||
onTap: () {},
|
||||
onLongPress: () {},
|
||||
onHover: (bool hover) {}
|
||||
onHover: (bool hover) {},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -139,7 +139,7 @@ void main() {
|
|||
highlightColor: const Color(0xf00fffff),
|
||||
onTap: () {},
|
||||
onLongPress: () {},
|
||||
onHover: (bool hover) {}
|
||||
onHover: (bool hover) {},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -174,7 +174,7 @@ void main() {
|
|||
highlightColor: const Color(0xf00fffff),
|
||||
onTap: () {},
|
||||
onLongPress: () {},
|
||||
onHover: (bool hover) {}
|
||||
onHover: (bool hover) {},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -3289,7 +3289,7 @@ void main() {
|
|||
Offset(inputDecoratorWidth - smallerBorderRadiusScaled, 0.0),
|
||||
],
|
||||
)
|
||||
..restore()
|
||||
..restore(),
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ void main() {
|
|||
),
|
||||
child: buildMaterial(
|
||||
color: Colors.cyan,
|
||||
elevation: 8.0
|
||||
elevation: 8.0,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
|
|
@ -103,7 +103,7 @@ void main() {
|
|||
await tester.pumpWidget(MaterialApp(
|
||||
home: Scaffold(
|
||||
key: scaffoldKey,
|
||||
body: const Center(child: Text('body'))
|
||||
body: const Center(child: Text('body')),
|
||||
)
|
||||
));
|
||||
|
||||
|
@ -466,7 +466,7 @@ void main() {
|
|||
await tester.pumpWidget(MaterialApp(
|
||||
home: Scaffold(
|
||||
key: scaffoldKey,
|
||||
body: const Center(child: Text('body'))
|
||||
body: const Center(child: Text('body')),
|
||||
)
|
||||
));
|
||||
|
||||
|
|
|
@ -672,7 +672,7 @@ void main() {
|
|||
context: context,
|
||||
items: <PopupMenuItem<int>>[
|
||||
const PopupMenuItem<int>(
|
||||
value: 1, child: Text('1')
|
||||
value: 1, child: Text('1'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -61,7 +61,7 @@ void main() {
|
|||
'color: Color(0xffffffff)',
|
||||
'shape: RoundedRectangleBorder(BorderSide(Color(0xff000000), 0.0, BorderStyle.none), BorderRadius.circular(2.0))',
|
||||
'elevation: 2.0',
|
||||
'text style: TextStyle(inherit: true, color: Color(0xffffffff))'
|
||||
'text style: TextStyle(inherit: true, color: Color(0xffffffff))',
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
@ -985,7 +985,7 @@ void main() {
|
|||
overlayColor: Color(0xff000010),
|
||||
thumbColor: Color(0xff000011),
|
||||
valueIndicatorColor: Color(0xff000012),
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1293,7 +1293,7 @@ void main() {
|
|||
sliderBox,
|
||||
paints
|
||||
..path(color: sliderTheme.valueIndicatorColor)
|
||||
..path(color: sliderTheme.valueIndicatorColor)
|
||||
..path(color: sliderTheme.valueIndicatorColor),
|
||||
);
|
||||
await gesture.up();
|
||||
// Wait for value indicator animation to finish.
|
||||
|
@ -1313,7 +1313,7 @@ void main() {
|
|||
sliderBox,
|
||||
paints
|
||||
..path(color: customColor1)
|
||||
..path(color: customColor1)
|
||||
..path(color: customColor1),
|
||||
);
|
||||
await gesture.up();
|
||||
});
|
||||
|
@ -1326,8 +1326,8 @@ void main() {
|
|||
primarySwatch: Colors.blue,
|
||||
sliderTheme: const SliderThemeData(
|
||||
thumbColor: Color(0xff000001),
|
||||
overlappingShapeStrokeColor: Color(0xff000002)
|
||||
)
|
||||
overlappingShapeStrokeColor: Color(0xff000002),
|
||||
),
|
||||
);
|
||||
final SliderThemeData sliderTheme = theme.sliderTheme;
|
||||
|
||||
|
@ -1382,7 +1382,7 @@ void main() {
|
|||
paints
|
||||
..circle(color: sliderTheme.thumbColor)
|
||||
..circle(color: sliderTheme.overlappingShapeStrokeColor)
|
||||
..circle(color: sliderTheme.thumbColor)
|
||||
..circle(color: sliderTheme.thumbColor),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -1396,7 +1396,7 @@ void main() {
|
|||
valueIndicatorColor: Color(0xff000001),
|
||||
overlappingShapeStrokeColor: Color(0xff000002),
|
||||
showValueIndicator: ShowValueIndicator.always,
|
||||
)
|
||||
),
|
||||
);
|
||||
final SliderThemeData sliderTheme = theme.sliderTheme;
|
||||
|
||||
|
@ -1454,7 +1454,7 @@ void main() {
|
|||
paints
|
||||
..path(color: sliderTheme.valueIndicatorColor)
|
||||
..path(color: sliderTheme.overlappingShapeStrokeColor)
|
||||
..path(color: sliderTheme.valueIndicatorColor)
|
||||
..path(color: sliderTheme.valueIndicatorColor),
|
||||
);
|
||||
|
||||
await gesture.up();
|
||||
|
@ -1470,7 +1470,7 @@ void main() {
|
|||
valueIndicatorColor: Color(0xff000001),
|
||||
overlappingShapeStrokeColor: Color(0xff000002),
|
||||
showValueIndicator: ShowValueIndicator.always,
|
||||
)
|
||||
),
|
||||
);
|
||||
final SliderThemeData sliderTheme = theme.sliderTheme;
|
||||
|
||||
|
|
|
@ -1133,7 +1133,7 @@ void main() {
|
|||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.add),
|
||||
title: Text('test'),
|
||||
)
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
|
|
|
@ -10,8 +10,8 @@ import '../rendering/mock_canvas.dart';
|
|||
Widget _buildSingleChildScrollViewWithScrollbar({
|
||||
TextDirection textDirection = TextDirection.ltr,
|
||||
EdgeInsets padding = EdgeInsets.zero,
|
||||
Widget child}
|
||||
) {
|
||||
Widget child,
|
||||
}) {
|
||||
return Directionality(
|
||||
textDirection: textDirection,
|
||||
child: MediaQuery(
|
||||
|
|
|
@ -22,7 +22,7 @@ class TestCanvas implements Canvas {
|
|||
Widget _buildBoilerplate({
|
||||
TextDirection textDirection = TextDirection.ltr,
|
||||
EdgeInsets padding = EdgeInsets.zero,
|
||||
Widget child
|
||||
Widget child,
|
||||
}) {
|
||||
return Directionality(
|
||||
textDirection: textDirection,
|
||||
|
|
|
@ -582,7 +582,7 @@ void main() {
|
|||
overlayColor: Color(0xff000010),
|
||||
thumbColor: Color(0xff000011),
|
||||
valueIndicatorColor: Color(0xff000012),
|
||||
)
|
||||
),
|
||||
);
|
||||
final SliderThemeData sliderTheme = theme.sliderTheme;
|
||||
double value = 0.45;
|
||||
|
|
|
@ -90,7 +90,7 @@ void main() {
|
|||
'rangeTrackShape: Instance of \'RoundedRectRangeSliderTrackShape\'',
|
||||
'rangeValueIndicatorShape: Instance of \'PaddleRangeSliderValueIndicatorShape\'',
|
||||
'showValueIndicator: always',
|
||||
'valueIndicatorTextStyle: TextStyle(inherit: true, color: Color(0xff000000))'
|
||||
'valueIndicatorTextStyle: TextStyle(inherit: true, color: Color(0xff000000))',
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -528,8 +528,7 @@ void main() {
|
|||
),
|
||||
);
|
||||
await gesture.up();
|
||||
}, skip: isBrowser
|
||||
);
|
||||
}, skip: isBrowser);
|
||||
|
||||
testWidgets('The slider track height can be overridden', (WidgetTester tester) async {
|
||||
final SliderThemeData sliderTheme = ThemeData().sliderTheme.copyWith(trackHeight: 16);
|
||||
|
|
|
@ -537,7 +537,7 @@ void main() {
|
|||
child: Scaffold(
|
||||
floatingActionButton: FloatingActionButton(
|
||||
child: const Icon(Icons.send),
|
||||
onPressed: () {}
|
||||
onPressed: () {},
|
||||
),
|
||||
body: Builder(
|
||||
builder: (BuildContext context) {
|
||||
|
@ -693,7 +693,7 @@ void main() {
|
|||
child: Scaffold(
|
||||
floatingActionButton: FloatingActionButton(
|
||||
child: const Icon(Icons.send),
|
||||
onPressed: () {}
|
||||
onPressed: () {},
|
||||
),
|
||||
body: Builder(
|
||||
builder: (BuildContext context) {
|
||||
|
@ -731,7 +731,7 @@ void main() {
|
|||
resizeToAvoidBottomInset: false,
|
||||
floatingActionButton: FloatingActionButton(
|
||||
child: const Icon(Icons.send),
|
||||
onPressed: () {}
|
||||
onPressed: () {},
|
||||
),
|
||||
body: Builder(
|
||||
builder: (BuildContext context) {
|
||||
|
@ -756,7 +756,7 @@ void main() {
|
|||
data: const MediaQueryData(
|
||||
padding: EdgeInsets.only(bottom: 20.0),
|
||||
),
|
||||
child: child
|
||||
child: child,
|
||||
)
|
||||
);
|
||||
await tester.tap(find.text('X'));
|
||||
|
|
|
@ -59,7 +59,7 @@ void main() {
|
|||
'contentTextStyle: TextStyle(inherit: true, color: Color(0xff123456))',
|
||||
'elevation: 2.0',
|
||||
'shape: RoundedRectangleBorder(BorderSide(Color(0xff000000), 0.0, BorderStyle.none), BorderRadius.circular(2.0))',
|
||||
'behavior: SnackBarBehavior.floating'
|
||||
'behavior: SnackBarBehavior.floating',
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
@ -506,7 +506,7 @@ void main() {
|
|||
content: Text('A'),
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
),
|
||||
const Step(
|
||||
title: Text('Step 1'),
|
||||
|
|
|
@ -96,7 +96,7 @@ class _NestedTabBarContainer extends StatelessWidget {
|
|||
Container(color: Colors.grey),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -978,8 +978,9 @@ void main() {
|
|||
// Update selection from [0 to 8] to [1 to 7].
|
||||
controller = TextEditingController.fromValue(
|
||||
controller.value.copyWith(selection: const TextSelection(
|
||||
baseOffset: 1, extentOffset: 7
|
||||
))
|
||||
baseOffset: 1,
|
||||
extentOffset: 7,
|
||||
)),
|
||||
);
|
||||
|
||||
// Mark entry to be dirty in order to trigger overlay update.
|
||||
|
@ -995,7 +996,7 @@ void main() {
|
|||
final TextEditingController controller = TextEditingController.fromValue(
|
||||
const TextEditingValue(
|
||||
text: 'readonly',
|
||||
composing: TextRange(start: 0, end: 8) // Simulate text composing.
|
||||
composing: TextRange(start: 0, end: 8), // Simulate text composing.
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -3447,7 +3448,7 @@ void main() {
|
|||
|
||||
expect(
|
||||
semantics,
|
||||
includesNodeWith(flags: <SemanticsFlag>[SemanticsFlag.isTextField, SemanticsFlag.isReadOnly])
|
||||
includesNodeWith(flags: <SemanticsFlag>[SemanticsFlag.isTextField, SemanticsFlag.isReadOnly]),
|
||||
);
|
||||
|
||||
semantics.dispose();
|
||||
|
@ -3606,7 +3607,7 @@ void main() {
|
|||
tester.testTextInput.updateEditingValue(const TextEditingValue(
|
||||
text: testValue,
|
||||
selection: TextSelection.collapsed(offset: 3),
|
||||
composing: TextRange(start: 0, end: testValue.length)
|
||||
composing: TextRange(start: 0, end: testValue.length),
|
||||
));
|
||||
await tester.pump();
|
||||
|
||||
|
|
|
@ -514,7 +514,7 @@ void main() {
|
|||
|
||||
await testTheme(tester, ThemeData(
|
||||
iconTheme: const IconThemeData(color: materialIconColor),
|
||||
cupertinoOverrideTheme: const CupertinoThemeData(primaryColor: cupertinoIconColor)
|
||||
cupertinoOverrideTheme: const CupertinoThemeData(primaryColor: cupertinoIconColor),
|
||||
));
|
||||
|
||||
expect(buildCount, 1);
|
||||
|
|
|
@ -873,7 +873,7 @@ void main() {
|
|||
expect(
|
||||
inkFeatures,
|
||||
paints
|
||||
..circle(color: splashColor)
|
||||
..circle(color: splashColor),
|
||||
);
|
||||
|
||||
await touchGesture.up();
|
||||
|
|
|
@ -89,7 +89,7 @@ void main() {
|
|||
'decoration: BoxDecoration(color: Color(0xffffffff))',
|
||||
'textStyle: TextStyle(inherit: true, decoration: TextDecoration.underline)',
|
||||
'wait duration: 0:00:00.100000',
|
||||
'show duration: 0:00:00.200000'
|
||||
'show duration: 0:00:00.200000',
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -588,7 +588,7 @@ void main() {
|
|||
tooltipTheme: const TooltipThemeData(
|
||||
textStyle: TextStyle(
|
||||
color: Colors.orange,
|
||||
decoration: TextDecoration.underline
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -619,7 +619,7 @@ void main() {
|
|||
child: Tooltip(
|
||||
textStyle: const TextStyle(
|
||||
color: Colors.orange,
|
||||
decoration: TextDecoration.underline
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
key: key,
|
||||
message: tooltipText,
|
||||
|
|
|
@ -175,9 +175,11 @@ void main() {
|
|||
}));
|
||||
|
||||
final dynamic err = await caughtError.future;
|
||||
expect(err, const TypeMatcher<NetworkImageLoadException>()
|
||||
expect(
|
||||
err,
|
||||
const TypeMatcher<NetworkImageLoadException>()
|
||||
.having((NetworkImageLoadException e) => e.statusCode, 'statusCode', errorStatusCode)
|
||||
.having((NetworkImageLoadException e) => e.uri, 'uri', Uri.base.resolve(requestUrl))
|
||||
.having((NetworkImageLoadException e) => e.uri, 'uri', Uri.base.resolve(requestUrl)),
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -660,7 +660,7 @@ void main() {
|
|||
WidgetSpan(child: SizedBox(width: 50, height: 30)),
|
||||
WidgetSpan(child: SizedBox(width: 50, height: 30)),
|
||||
WidgetSpan(child: SizedBox(width: 50, height: 30)),
|
||||
]
|
||||
],
|
||||
);
|
||||
|
||||
// We provide dimensions for the widgets
|
||||
|
|
|
@ -178,7 +178,7 @@ void main() {
|
|||
TextSpan(
|
||||
children: <InlineSpan>[
|
||||
WidgetSpan(child: SizedBox(width: 10, height: 10)),
|
||||
TextSpan(text: 'The sky is falling :)')
|
||||
TextSpan(text: 'The sky is falling :)'),
|
||||
],
|
||||
)
|
||||
),
|
||||
|
@ -196,7 +196,7 @@ void main() {
|
|||
TextSpan(
|
||||
children: <InlineSpan>[
|
||||
WidgetSpan(child: SizedBox(width: 10, height: 11)),
|
||||
TextSpan(text: 'The sky is falling :)')
|
||||
TextSpan(text: 'The sky is falling :)'),
|
||||
],
|
||||
)
|
||||
),
|
||||
|
|
|
@ -64,13 +64,13 @@ void main() {
|
|||
' RenderBox subclasses need to either override performLayout() to\n'
|
||||
' set a size and lay out any children, or, set sizedByParent to\n'
|
||||
' true so that performResize() sizes the render object.\n'
|
||||
)
|
||||
),
|
||||
);
|
||||
expect(
|
||||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'RenderBox subclasses need to either override performLayout() to set a '
|
||||
'size and lay out any children, or, set sizedByParent to true so that '
|
||||
'performResize() sizes the render object.'
|
||||
'performResize() sizes the render object.',
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -128,7 +128,7 @@ void main() {
|
|||
'parentData field. Since RenderPadding does not in fact use that '
|
||||
'ParentData class for its children, it must provide an implementation '
|
||||
'of applyPaintTransform that supports the specific ParentData subclass '
|
||||
'used by its children (which apparently is ParentData).'
|
||||
'used by its children (which apparently is ParentData).',
|
||||
);
|
||||
|
||||
});
|
||||
|
@ -160,7 +160,7 @@ void main() {
|
|||
' object).\n'
|
||||
' Because this RenderBox has sizedByParent set to false, it must\n'
|
||||
' set its size in performLayout().\n'
|
||||
)
|
||||
),
|
||||
);
|
||||
expect(result.diagnostics.where((DiagnosticsNode node) => node.level == DiagnosticLevel.hint), isEmpty);
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ void main() {
|
|||
' to be notified when the size changes and therefore attempts to\n'
|
||||
' read that size are almost certainly a source of bugs. A different\n'
|
||||
' approach should be used.\n'
|
||||
)
|
||||
),
|
||||
);
|
||||
expect(result.diagnostics.where((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).length, 2);
|
||||
}
|
||||
|
@ -404,7 +404,7 @@ void main() {
|
|||
);
|
||||
expect(
|
||||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'If you do not have a specific height in mind, then pass double.infinity instead.'
|
||||
'If you do not have a specific height in mind, then pass double.infinity instead.',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ void main() {
|
|||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'If you perform computations on another height before passing it to '
|
||||
'getMinIntrinsicWidth, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
'to force the value into the valid range.',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,7 @@ void main() {
|
|||
);
|
||||
expect(
|
||||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'If you do not have a specific width in mind, then pass double.infinity instead.'
|
||||
'If you do not have a specific width in mind, then pass double.infinity instead.',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -485,7 +485,7 @@ void main() {
|
|||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'If you perform computations on another width before passing it to '
|
||||
'getMinIntrinsicHeight, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
'to force the value into the valid range.',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -510,7 +510,7 @@ void main() {
|
|||
);
|
||||
expect(
|
||||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'If you do not have a specific height in mind, then pass double.infinity instead.'
|
||||
'If you do not have a specific height in mind, then pass double.infinity instead.',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,7 @@ void main() {
|
|||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'If you perform computations on another height before passing it to '
|
||||
'getMaxIntrinsicWidth, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
'to force the value into the valid range.',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -563,7 +563,7 @@ void main() {
|
|||
);
|
||||
expect(
|
||||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'If you do not have a specific width in mind, then pass double.infinity instead.'
|
||||
'If you do not have a specific width in mind, then pass double.infinity instead.',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -591,7 +591,7 @@ void main() {
|
|||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'If you perform computations on another width before passing it to '
|
||||
'getMaxIntrinsicHeight, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
'to force the value into the valid range.',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -955,7 +955,7 @@ void main() {
|
|||
'If you are trying to perform a hit test during the layout phase '
|
||||
'itself, make sure you only hit test nodes that have completed '
|
||||
'layout (e.g. the node\'s children, after their layout() method has '
|
||||
'been called).'
|
||||
'been called).',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -991,7 +991,7 @@ void main() {
|
|||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'A RenderBox object must have an explicit size before it can be '
|
||||
'hit-tested. Make sure that the RenderBox in question sets its '
|
||||
'size during layout.'
|
||||
'size during layout.',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -149,7 +149,7 @@ void main() {
|
|||
s.debugPaint(
|
||||
PaintingContext(
|
||||
ContainerLayer(), const Rect.fromLTRB(0.0, 0.0, 800.0, 600.0)),
|
||||
const Offset(0.0, 500)
|
||||
const Offset(0.0, 500),
|
||||
);
|
||||
} catch(e) {
|
||||
error = e;
|
||||
|
@ -182,7 +182,7 @@ void main() {
|
|||
s.debugPaint(
|
||||
PaintingContext(
|
||||
ContainerLayer(), const Rect.fromLTRB(0.0, 0.0, 800.0, 600.0)),
|
||||
const Offset(0.0, 500)
|
||||
const Offset(0.0, 500),
|
||||
);
|
||||
} catch(e) {
|
||||
error = e;
|
||||
|
|
|
@ -1042,7 +1042,7 @@ class _RRectPaintPredicate extends _DrawCommandPaintPredicate {
|
|||
color: color,
|
||||
strokeWidth: strokeWidth,
|
||||
hasMaskFilter: hasMaskFilter,
|
||||
style: style
|
||||
style: style,
|
||||
);
|
||||
|
||||
final RRect rrect;
|
||||
|
@ -1093,7 +1093,7 @@ class _DRRectPaintPredicate extends _TwoParameterPaintPredicate<RRect, RRect> {
|
|||
|
||||
class _CirclePaintPredicate extends _DrawCommandPaintPredicate {
|
||||
_CirclePaintPredicate({ this.x, this.y, this.radius, Color color, double strokeWidth, bool hasMaskFilter, PaintingStyle style }) : super(
|
||||
#drawCircle, 'a circle', 3, 2, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style
|
||||
#drawCircle, 'a circle', 3, 2, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style,
|
||||
);
|
||||
|
||||
final double x;
|
||||
|
@ -1137,7 +1137,7 @@ class _CirclePaintPredicate extends _DrawCommandPaintPredicate {
|
|||
|
||||
class _PathPaintPredicate extends _DrawCommandPaintPredicate {
|
||||
_PathPaintPredicate({ this.includes, this.excludes, Color color, double strokeWidth, bool hasMaskFilter, PaintingStyle style }) : super(
|
||||
#drawPath, 'a path', 2, 1, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style
|
||||
#drawPath, 'a path', 2, 1, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style,
|
||||
);
|
||||
|
||||
final Iterable<Offset> includes;
|
||||
|
@ -1177,7 +1177,7 @@ class _PathPaintPredicate extends _DrawCommandPaintPredicate {
|
|||
// TODO(ianh): add arguments to test the length, angle, that kind of thing
|
||||
class _LinePaintPredicate extends _DrawCommandPaintPredicate {
|
||||
_LinePaintPredicate({ this.p1, this.p2, Color color, double strokeWidth, bool hasMaskFilter, PaintingStyle style }) : super(
|
||||
#drawLine, 'a line', 3, 2, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style
|
||||
#drawLine, 'a line', 3, 2, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style,
|
||||
);
|
||||
|
||||
final Offset p1;
|
||||
|
@ -1210,7 +1210,7 @@ class _LinePaintPredicate extends _DrawCommandPaintPredicate {
|
|||
|
||||
class _ArcPaintPredicate extends _DrawCommandPaintPredicate {
|
||||
_ArcPaintPredicate({ Color color, double strokeWidth, bool hasMaskFilter, PaintingStyle style }) : super(
|
||||
#drawArc, 'an arc', 5, 4, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style
|
||||
#drawArc, 'an arc', 5, 4, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1291,7 +1291,7 @@ class _ShadowPredicate extends _PaintPredicate {
|
|||
|
||||
class _DrawImagePaintPredicate extends _DrawCommandPaintPredicate {
|
||||
_DrawImagePaintPredicate({ this.image, this.x, this.y, Color color, double strokeWidth, bool hasMaskFilter, PaintingStyle style }) : super(
|
||||
#drawImage, 'an image', 3, 2, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style
|
||||
#drawImage, 'an image', 3, 2, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style,
|
||||
);
|
||||
|
||||
final ui.Image image;
|
||||
|
@ -1335,7 +1335,7 @@ class _DrawImagePaintPredicate extends _DrawCommandPaintPredicate {
|
|||
|
||||
class _DrawImageRectPaintPredicate extends _DrawCommandPaintPredicate {
|
||||
_DrawImageRectPaintPredicate({ this.image, this.source, this.destination, Color color, double strokeWidth, bool hasMaskFilter, PaintingStyle style }) : super(
|
||||
#drawImageRect, 'an image', 4, 3, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style
|
||||
#drawImageRect, 'an image', 4, 3, color: color, strokeWidth: strokeWidth, hasMaskFilter: hasMaskFilter, style: style,
|
||||
);
|
||||
|
||||
final ui.Image image;
|
||||
|
|
|
@ -66,7 +66,7 @@ void main() {
|
|||
'══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞══════════════════════\n'
|
||||
'The following assertion was thrown during performLayout():\n'
|
||||
'TestThrowingRenderObject does not support performLayout.\n'
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
expect(
|
||||
|
|
|
@ -98,7 +98,7 @@ void main() {
|
|||
);
|
||||
expect(
|
||||
flutterError.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'This usually indicates an error in the Flutter framework itself.'
|
||||
'This usually indicates an error in the Flutter framework itself.',
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ void main() {
|
|||
final List<RenderBox> children = <RenderBox>[
|
||||
RenderSizedBox(const Size(400.0, 100.0)),
|
||||
RenderSizedBox(const Size(400.0, 100.0)),
|
||||
RenderSizedBox(const Size(400.0, 100.0))
|
||||
RenderSizedBox(const Size(400.0, 100.0)),
|
||||
];
|
||||
final TestRenderSliverBoxChildManager childManager = TestRenderSliverBoxChildManager(
|
||||
children: children,
|
||||
|
|
|
@ -79,7 +79,7 @@ void main() {
|
|||
|
||||
node.updateWith(
|
||||
config: config,
|
||||
childrenInInversePaintOrder: children
|
||||
childrenInInversePaintOrder: children,
|
||||
);
|
||||
|
||||
children.add( SemanticsNode()
|
||||
|
@ -92,7 +92,7 @@ void main() {
|
|||
try {
|
||||
node.updateWith(
|
||||
config: config,
|
||||
childrenInInversePaintOrder: children
|
||||
childrenInInversePaintOrder: children,
|
||||
);
|
||||
} on FlutterError catch (e) {
|
||||
error = e;
|
||||
|
@ -106,7 +106,7 @@ void main() {
|
|||
));
|
||||
expect(
|
||||
error.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'Instead of mutating the existing list, create a new list containing the desired `SemanticsNode`s.'
|
||||
'Instead of mutating the existing list, create a new list containing the desired `SemanticsNode`s.',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ void main() {
|
|||
..rect = const Rect.fromLTRB(5.0, 5.0, 10.0, 10.0),
|
||||
SemanticsNode()
|
||||
..isMergedIntoParent = true
|
||||
..rect = const Rect.fromLTRB(10.0, 10.0, 20.0, 20.0)
|
||||
..rect = const Rect.fromLTRB(10.0, 10.0, 20.0, 20.0),
|
||||
];
|
||||
node.updateWith(
|
||||
config: config,
|
||||
|
@ -133,7 +133,7 @@ void main() {
|
|||
..rect = const Rect.fromLTRB(40.0, 14.0, 20.0, 20.0);
|
||||
node.updateWith(
|
||||
config: config,
|
||||
childrenInInversePaintOrder: modifiedChildren
|
||||
childrenInInversePaintOrder: modifiedChildren,
|
||||
);
|
||||
} on FlutterError catch (e) {
|
||||
error = e;
|
||||
|
@ -157,7 +157,7 @@ void main() {
|
|||
|
||||
expect(
|
||||
error.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'Instead of mutating the existing list, create a new list containing the desired `SemanticsNode`s.'
|
||||
'Instead of mutating the existing list, create a new list containing the desired `SemanticsNode`s.',
|
||||
);
|
||||
// Two previous children and two new children.
|
||||
expect(error.diagnostics.where((DiagnosticsNode node) => node.value is SemanticsNode).length, 4);
|
||||
|
|
|
@ -168,7 +168,7 @@ void main() {
|
|||
),
|
||||
Text('one\ntwo\nthree\nfour\nfive\nsix\nseven',
|
||||
key: key2,
|
||||
style: const TextStyle(fontSize: fontSize2)
|
||||
style: const TextStyle(fontSize: fontSize2),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -1875,7 +1875,7 @@ void main() {
|
|||
actions: <SemanticsAction>[
|
||||
SemanticsAction.moveCursorBackwardByCharacter,
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.moveCursorBackwardByWord
|
||||
SemanticsAction.moveCursorBackwardByWord,
|
||||
],
|
||||
value: expectedValue,
|
||||
textDirection: TextDirection.ltr,
|
||||
|
@ -2292,7 +2292,7 @@ void main() {
|
|||
'fontWeightIndex': 5,
|
||||
'textAlignIndex': 4,
|
||||
'textDirectionIndex': 0,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ void main() {
|
|||
'- Container-[<1>]\n'
|
||||
'- Container-[<2>]\n'
|
||||
'A GlobalKey can only be specified on one widget at a time in the widget tree.'
|
||||
)
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -161,7 +161,7 @@ void main() {
|
|||
' SizedBox-[GlobalKey#00000 problematic]\n'
|
||||
' Placeholder-[GlobalKey#00000 problematic]\n'
|
||||
'A GlobalKey can only be specified on one widget at a time in the widget tree.'
|
||||
)
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -190,7 +190,7 @@ void main() {
|
|||
' Container-[GlobalKey#00000 problematic]\n'
|
||||
' Placeholder-[GlobalKey#00000 problematic]\n'
|
||||
'A GlobalKey can only be specified on one widget at a time in the widget tree.'
|
||||
)
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue