prefer_initializing_formals (#8797)

This commit is contained in:
Alexandre Ardhuin
2017-03-15 18:30:55 +01:00
committed by GitHub
parent f8238185cc
commit a9ba0e2f88
27 changed files with 66 additions and 97 deletions

View File

@@ -66,9 +66,8 @@ enum Operation { Addition, Subtraction, Multiplication, Division }
/// A token that represents an arithmetic operation symbol.
class OperationToken extends ExpressionToken {
OperationToken(Operation operation)
: operation = operation,
super(opString(operation));
OperationToken(this.operation)
: super(opString(operation));
Operation operation;

View File

@@ -548,11 +548,10 @@ class RenderBoxToRenderSectorAdapter extends RenderBox with RenderObjectWithChil
}
class RenderSolidColor extends RenderDecoratedSector {
RenderSolidColor(Color backgroundColor, {
RenderSolidColor(this.backgroundColor, {
this.desiredDeltaRadius: double.INFINITY,
this.desiredDeltaTheta: kTwoPi
}) : this.backgroundColor = backgroundColor,
super(new BoxDecoration(backgroundColor: backgroundColor));
}) : super(new BoxDecoration(backgroundColor: backgroundColor));
double desiredDeltaRadius;
double desiredDeltaTheta;

View File

@@ -9,9 +9,8 @@ class RenderSolidColorBox extends RenderDecoratedBox {
final Size desiredSize;
final Color backgroundColor;
RenderSolidColorBox(Color backgroundColor, { this.desiredSize: Size.infinite })
: backgroundColor = backgroundColor,
super(decoration: new BoxDecoration(backgroundColor: backgroundColor));
RenderSolidColorBox(this.backgroundColor, { this.desiredSize: Size.infinite })
: super(decoration: new BoxDecoration(backgroundColor: backgroundColor));
@override
double computeMinIntrinsicWidth(double height) {

View File

@@ -11,11 +11,11 @@ typedef void StockRowActionCallback(Stock stock);
class StockRow extends StatelessWidget {
StockRow({
Stock stock,
this.stock,
this.onPressed,
this.onDoubleTap,
this.onLongPressed
}) : this.stock = stock, super(key: new ObjectKey(stock));
}) : super(key: new ObjectKey(stock));
final Stock stock;
final StockRowActionCallback onPressed;