Enable avoid_redundant_argument_values lint (#91409)

This commit is contained in:
Ian Hickson
2021-10-07 20:13:02 -07:00
committed by GitHub
parent 4bf7179e51
commit 5fd259be24
667 changed files with 1693 additions and 3385 deletions

View File

@@ -370,7 +370,6 @@ class UserHeader extends StatelessWidget {
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
RichText(text: TextSpan(
@@ -569,7 +568,6 @@ class BottomBar extends StatelessWidget {
border: Border(
top: BorderSide(
color: Theme.of(context).dividerColor,
width: 1.0,
),
),
),

View File

@@ -28,7 +28,6 @@ Future<void> main() async {
},
behavior: HitTestBehavior.opaque,
child: const IgnorePointer(
ignoring: true,
child: ComplexLayoutApp(),
),
));

View File

@@ -147,7 +147,6 @@ class _ShadowWidget extends StatelessWidget {
),
size: Size(width, height),
isComplex: true,
willChange: false,
),
);
}

View File

@@ -73,7 +73,6 @@ class _FilteredChildAnimationPageState extends State<FilteredChildAnimationPage>
color: Colors.green,
boxShadow: complex ? <BoxShadow>[
const BoxShadow(
color: Colors.black,
blurRadius: 10.0,
),
] : null,

View File

@@ -32,7 +32,6 @@ class _MultiWidgetConstructTableState extends State<MultiWidgetConstructTable>
_controller = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 10000),
lowerBound: 0,
upperBound: colorList.length + 1.0,
)..repeat();
}

View File

@@ -113,7 +113,7 @@ class _CustomPainter extends CustomPainter {
_textPainter.text = span;
_textPainter.layout(minWidth: 0, maxWidth: width);
_textPainter.layout(maxWidth: width);
_linePainter.style = PaintingStyle.fill;
canvas.drawRect(
Rect.fromLTWH(xPosition, yPosition - viewPadding, width, height),

View File

@@ -1833,7 +1833,7 @@ void pathOps78() {
void pathOps79() {
final Path path79 = Path();
path79.addRRect(RRect.fromRectAndCorners(const Rect.fromLTRB(0, 0, 64, 56), topLeft: Radius.zero, topRight: Radius.zero, bottomLeft: const Radius.circular(10), bottomRight: Radius.zero, ));
path79.addRRect(RRect.fromRectAndCorners(const Rect.fromLTRB(0, 0, 64, 56), bottomLeft: const Radius.circular(10), ));
gFillType = path79.fillType;
path80 = path79.shift(const Offset(906, 136));
gFillType = path79.fillType;
@@ -5828,7 +5828,7 @@ void pathOps576() {
path576.moveTo(0, 0);
path576.lineTo(220.60000000000002, 0);
path576.quadraticBezierTo(235.60000000000002, 0, 237.569696969697, 7.817946907441011);
path576.arcToPoint(const Offset(299.630303030303, 7.817946907441011), radius: const Radius.circular(32), rotation: 0, largeArc: false, clockwise: false);
path576.arcToPoint(const Offset(299.630303030303, 7.817946907441011), radius: const Radius.circular(32), clockwise: false);
path576.quadraticBezierTo(301.6, 0, 316.6, 0);
path576.lineTo(312.6, 0);
path576.lineTo(312.6, 48);

View File

@@ -25,7 +25,6 @@ class BenchSimpleLazyTextScroll extends WidgetRecorder {
child: Row(
children: const <Widget>[
Flexible(
flex: 1,
child: _TestScrollingWidget(
initialScrollOffset: 0,
scrollDistance: 300,
@@ -33,7 +32,6 @@ class BenchSimpleLazyTextScroll extends WidgetRecorder {
),
),
Flexible(
flex: 1,
child: _TestScrollingWidget(
initialScrollOffset: 1000,
scrollDistance: 500,
@@ -41,7 +39,6 @@ class BenchSimpleLazyTextScroll extends WidgetRecorder {
),
),
Flexible(
flex: 1,
child: _TestScrollingWidget(
initialScrollOffset: 2000,
scrollDistance: 700,

View File

@@ -417,7 +417,6 @@ class ColorItem extends StatelessWidget {
bottom: false,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text('$_counter:$prefix$index'),
Text(colorString()),

View File

@@ -155,7 +155,6 @@ class ProductOption extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 11, vertical: 5),
decoration: BoxDecoration(
border: Border.all(
width: 1,
color: const Color(0xffebebeb),
),
borderRadius: const BorderRadius.all(Radius.circular(15)),

View File

@@ -31,7 +31,7 @@ import 'src/web/recorder.dart';
typedef RecorderFactory = Recorder Function();
const bool isCanvasKit = bool.fromEnvironment('FLUTTER_WEB_USE_SKIA', defaultValue: false);
const bool isCanvasKit = bool.fromEnvironment('FLUTTER_WEB_USE_SKIA');
/// List of all benchmarks that run in the devicelab.
///

View File

@@ -31,11 +31,9 @@ void main() {
final List<PointerEventRecord> records = <PointerEventRecord>[
PointerEventRecord(Duration.zero, <PointerEvent>[
PointerAddedEvent(
timeStamp: Duration.zero,
position: location,
),
PointerDownEvent(
timeStamp: Duration.zero,
position: location,
pointer: 1,
),

View File

@@ -167,16 +167,16 @@ void main() {
}
runAddListenerBenchmark(_kNumWarmUp, addResult: false);
runAddListenerBenchmark(_kNumIterations, addResult: true);
runAddListenerBenchmark(_kNumIterations);
runNotifyListenerBenchmark(_kNumWarmUp, addResult: false);
runNotifyListenerBenchmark(_kNumIterations, addResult: true);
runNotifyListenerBenchmark(_kNumIterations);
runRemoveListenerBenchmark(_kNumWarmUp, addResult: false);
runRemoveListenerBenchmark(_kNumIterations, addResult: true);
runRemoveListenerBenchmark(_kNumIterations);
runRemoveListenerWhileNotifyingBenchmark(_kNumWarmUp, addResult: false);
runRemoveListenerWhileNotifyingBenchmark(_kNumIterations, addResult: true);
runRemoveListenerWhileNotifyingBenchmark(_kNumIterations);
printer.printToStdout();
}

View File

@@ -48,7 +48,7 @@ void main() {
Offset(0.70, 0.04),
Offset(0.78, 0.98),
Offset(0.88, -0.00),
], tension: 0.00);
]);
_testCurve(
catmullRomCurve,
name: 'catmullrom_transform_iteration',

View File

@@ -19,7 +19,7 @@ void main() {
for (int i = 0; i < words.length; i++) {
if (i.isEven) {
data.add(
InlineSpanSemanticsInformation(words[i], isPlaceholder: false),
InlineSpanSemanticsInformation(words[i]),
);
} else if (i.isEven) {
data.add(

View File

@@ -38,7 +38,6 @@ class AndroidPlatformView extends StatelessWidget {
id: params.id,
viewType: viewType,
layoutDirection: TextDirection.ltr,
creationParams: null,
creationParamsCodec: const StandardMessageCodec(),
)
..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)