add missing trailing commas (#81406)

This commit is contained in:
Alexandre Ardhuin
2021-04-28 22:54:49 +02:00
committed by GitHub
parent 7c27db3dfe
commit 7f31861914
26 changed files with 131 additions and 93 deletions

View File

@@ -16,8 +16,9 @@ Future<void> beginFrame(Duration timeStamp) async {
final ui.Paint backgroundPaint = ui.Paint()..color = Colors.white;
canvas.drawRect(paintBounds, backgroundPaint);
await const DefaultShaderWarmUp(
drawCallSpacing: 80.0, canvasSize: ui.Size(1024, 1024))
.warmUpOnCanvas(canvas);
drawCallSpacing: 80.0,
canvasSize: ui.Size(1024, 1024),
).warmUpOnCanvas(canvas);
final ui.Picture picture = recorder.endRecording();
// COMPOSITE

View File

@@ -29,8 +29,10 @@ void beginFrame(Duration timeStamp) {
final double t = timeStamp.inMicroseconds / Duration.microsecondsPerMillisecond / 1800.0;
canvas.rotate(math.pi * (t % 1.0));
canvas.drawRect(const ui.Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0),
ui.Paint()..color = const ui.Color.fromARGB(255, 0, 255, 0));
canvas.drawRect(
const ui.Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0),
ui.Paint()..color = const ui.Color.fromARGB(255, 0, 255, 0),
);
final ui.Picture picture = recorder.endRecording();
// COMPOSITE

View File

@@ -19,8 +19,10 @@ ui.Picture paint(ui.Rect paintBounds) {
final ui.Size logicalSize = ui.window.physicalSize / devicePixelRatio;
canvas.translate(logicalSize.width / 2.0, logicalSize.height / 2.0);
canvas.drawRect(const ui.Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0),
ui.Paint()..color = const ui.Color.fromARGB(255, 0, 255, 0));
canvas.drawRect(
const ui.Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0),
ui.Paint()..color = const ui.Color.fromARGB(255, 0, 255, 0),
);
// The paint method of Paragraph draws the contents of the paragraph onto the
// given canvas.

View File

@@ -20,7 +20,7 @@ class NonStopVSync implements TickerProvider {
void main() {
// We first create a render object that represents a green box.
final RenderBox green = RenderDecoratedBox(
decoration: const BoxDecoration(color: Color(0xFF00FF00))
decoration: const BoxDecoration(color: Color(0xFF00FF00)),
);
// Second, we wrap that green box in a render object that forces the green box
// to have a specific size.

View File

@@ -40,7 +40,7 @@ class Calculator {
if (key is int && i++ % _NOTIFY_INTERVAL == 0)
onProgressListener(i.toDouble(), _NUM_ITEMS.toDouble());
return value;
}
},
);
try {
final List<dynamic> result = decoder.convert(_data) as List<dynamic>;
@@ -249,7 +249,7 @@ class IsolateExampleState extends State<StatefulWidget> with SingleTickerProvide
Opacity(
opacity: _calculationManager.isRunning ? 1.0 : 0.0,
child: CircularProgressIndicator(
value: _progress
value: _progress,
),
),
Text(_status),

View File

@@ -30,8 +30,9 @@ class _GesturePainter extends CustomPainter {
final Offset center = size.center(Offset.zero) * zoom + offset;
final double radius = size.width / 2.0 * zoom;
final Gradient gradient = RadialGradient(
colors: forward ? <Color>[swatch.shade50, swatch.shade900]
: <Color>[swatch.shade900, swatch.shade50]
colors: forward
? <Color>[swatch.shade50, swatch.shade900]
: <Color>[swatch.shade900, swatch.shade50],
);
final Paint paint = Paint()
..shader = gradient.createShader(Rect.fromCircle(

View File

@@ -135,7 +135,7 @@ class SectorAppState extends State<SectorApp> {
child: Container(
margin: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
border: Border.all()
border: Border.all(),
),
padding: const EdgeInsets.all(8.0),
child: WidgetToRenderBoxAdapter(

View File

@@ -67,8 +67,8 @@ class SpeakerSeparator extends StatelessWidget {
margin: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 64.0),
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(color: Color.fromARGB(24, 0, 0, 0))
)
bottom: BorderSide(color: Color.fromARGB(24, 0, 0, 0)),
),
),
);
}