Add missing trailing commas (#28673)

* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
diff --git a/examples/layers/widgets/gestures.dart b/examples/layers/widgets/gestures.dart
index 1e884a9..6dc63ef 100644
--- a/examples/layers/widgets/gestures.dart
+++ b/examples/layers/widgets/gestures.dart
@@ -13,7 +13,7 @@
     this.scaleEnabled,
     this.tapEnabled,
     this.doubleTapEnabled,
-    this.longPressEnabled
+    this.longPressEnabled,
   });
 
   final double zoom;
@@ -159,9 +159,9 @@
               scaleEnabled: _scaleEnabled,
               tapEnabled: _tapEnabled,
               doubleTapEnabled: _doubleTapEnabled,
-              longPressEnabled: _longPressEnabled
-            )
-          )
+              longPressEnabled: _longPressEnabled,
+            ),
+          ),
         ),
         Positioned(
           bottom: 0.0,
@@ -175,45 +175,45 @@
                     children: <Widget>[
                       Checkbox(
                         value: _scaleEnabled,
-                        onChanged: (bool value) { setState(() { _scaleEnabled = value; }); }
+                        onChanged: (bool value) { setState(() { _scaleEnabled = value; }); },
                       ),
                       const Text('Scale'),
-                    ]
+                    ],
                   ),
                   Row(
                     children: <Widget>[
                       Checkbox(
                         value: _tapEnabled,
-                        onChanged: (bool value) { setState(() { _tapEnabled = value; }); }
+                        onChanged: (bool value) { setState(() { _tapEnabled = value; }); },
                       ),
                       const Text('Tap'),
-                    ]
+                    ],
                   ),
                   Row(
                     children: <Widget>[
                       Checkbox(
                         value: _doubleTapEnabled,
-                        onChanged: (bool value) { setState(() { _doubleTapEnabled = value; }); }
+                        onChanged: (bool value) { setState(() { _doubleTapEnabled = value; }); },
                       ),
                       const Text('Double Tap'),
-                    ]
+                    ],
                   ),
                   Row(
                     children: <Widget>[
                       Checkbox(
                         value: _longPressEnabled,
-                        onChanged: (bool value) { setState(() { _longPressEnabled = value; }); }
+                        onChanged: (bool value) { setState(() { _longPressEnabled = value; }); },
                       ),
                       const Text('Long Press'),
-                    ]
+                    ],
                   ),
                 ],
-                crossAxisAlignment: CrossAxisAlignment.start
-              )
-            )
-          )
+                crossAxisAlignment: CrossAxisAlignment.start,
+              ),
+            ),
+          ),
         ),
-      ]
+      ],
     );
   }
 }
@@ -223,7 +223,7 @@
     theme: ThemeData.dark(),
     home: Scaffold(
       appBar: AppBar(title: const Text('Gestures Demo')),
-      body: GestureDemo()
-    )
+      body: GestureDemo(),
+    ),
   ));
 }
diff --git a/examples/layers/widgets/media_query.dart b/examples/layers/widgets/media_query.dart
index 091fadb..4ef2687 100644
--- a/examples/layers/widgets/media_query.dart
+++ b/examples/layers/widgets/media_query.dart
@@ -19,8 +19,8 @@
           margin: const EdgeInsets.all(8.0),
           color: Colors.lightBlueAccent.shade100,
         ),
-        Text(name)
-      ]
+        Text(name),
+      ],
     );
   }
 }
@@ -38,24 +38,24 @@
           Expanded(
             child: Container(
               color: Colors.lightBlueAccent.shade100,
-            )
+            ),
           ),
           Container(
             margin: const EdgeInsets.only(left: 8.0),
             child: Row(
               children: <Widget>[
                 Expanded(
-                  child: Text(name)
+                  child: Text(name),
                 ),
                 const IconButton(
                   icon: Icon(Icons.more_vert),
-                  onPressed: null
-                )
-              ]
-            )
-          )
-        ]
-      )
+                  onPressed: null,
+                ),
+              ],
+            ),
+          ),
+        ],
+      ),
     );
   }
 }
@@ -99,9 +99,9 @@
     title: 'Media Query Example',
     home: Scaffold(
       appBar: AppBar(
-        title: const Text('Media Query Example')
+        title: const Text('Media Query Example'),
       ),
-      body: Material(child: AdaptiveContainer(names: _kNames))
-    )
+      body: Material(child: AdaptiveContainer(names: _kNames)),
+    ),
   ));
 }
diff --git a/examples/layers/widgets/sectors.dart b/examples/layers/widgets/sectors.dart
index 553e8af..2b64e99 100644
--- a/examples/layers/widgets/sectors.dart
+++ b/examples/layers/widgets/sectors.dart
@@ -12,7 +12,7 @@
 RenderBox initCircle() {
   return RenderBoxToRenderSectorAdapter(
     innerRadius: 25.0,
-    child: RenderSectorRing(padding: 0.0)
+    child: RenderSectorRing(padding: 0.0),
   );
 }
 
@@ -74,7 +74,7 @@
     ring.add(RenderSolidColor(color, desiredDeltaTheta: kTwoPi * 0.2));
     return RenderBoxToRenderSectorAdapter(
       innerRadius: 5.0,
-      child: ring
+      child: ring,
     );
   }
   RenderBoxToRenderSectorAdapter sectorAddIcon = initSector(const Color(0xFF00DD00));
@@ -104,12 +104,12 @@
                       Container(
                         padding: const EdgeInsets.all(4.0),
                         margin: const EdgeInsets.only(right: 10.0),
-                        child: WidgetToRenderBoxAdapter(renderBox: sectorAddIcon)
+                        child: WidgetToRenderBoxAdapter(renderBox: sectorAddIcon),
                       ),
                       const Text('ADD SECTOR'),
-                    ]
-                  )
-                )
+                    ],
+                  ),
+                ),
               ),
               RaisedButton(
                 onPressed: _enabledRemove ? removeSector : null,
@@ -119,16 +119,16 @@
                       Container(
                         padding: const EdgeInsets.all(4.0),
                         margin: const EdgeInsets.only(right: 10.0),
-                        child: WidgetToRenderBoxAdapter(renderBox: sectorRemoveIcon)
+                        child: WidgetToRenderBoxAdapter(renderBox: sectorRemoveIcon),
                       ),
                       const Text('REMOVE SECTOR'),
-                    ]
-                  )
-                )
+                    ],
+                  ),
+                ),
               ),
             ],
-            mainAxisAlignment: MainAxisAlignment.spaceAround
-          )
+            mainAxisAlignment: MainAxisAlignment.spaceAround,
+          ),
         ),
         Expanded(
           child: Container(
@@ -139,12 +139,12 @@
             padding: const EdgeInsets.all(8.0),
             child: WidgetToRenderBoxAdapter(
               renderBox: sectors,
-              onBuild: doUpdates
-            )
-          )
+              onBuild: doUpdates,
+            ),
+          ),
         ),
       ],
-      mainAxisAlignment: MainAxisAlignment.spaceBetween
+      mainAxisAlignment: MainAxisAlignment.spaceBetween,
     );
   }
 
@@ -155,10 +155,10 @@
       title: 'Sector Layout',
       home: Scaffold(
         appBar: AppBar(
-          title: const Text('Sector Layout in a Widget Tree')
+          title: const Text('Sector Layout in a Widget Tree'),
         ),
-        body: buildBody()
-      )
+        body: buildBody(),
+      ),
     );
   }
 }
diff --git a/examples/layers/widgets/spinning_mixed.dart b/examples/layers/widgets/spinning_mixed.dart
index 4801ac7..b9f4d1c 100644
--- a/examples/layers/widgets/spinning_mixed.dart
+++ b/examples/layers/widgets/spinning_mixed.dart
@@ -26,7 +26,7 @@
     return Expanded(
       child: Container(
         color: color,
-      )
+      ),
     );
   }
 }
diff --git a/examples/layers/widgets/spinning_square.dart b/examples/layers/widgets/spinning_square.dart
index 6539ffc..efaae8c 100644
--- a/examples/layers/widgets/spinning_square.dart
+++ b/examples/layers/widgets/spinning_square.dart
@@ -38,7 +38,7 @@
         width: 200.0,
         height: 200.0,
         color: const Color(0xFF00FF00),
-      )
+      ),
     );
   }
 }
diff --git a/examples/layers/widgets/styled_text.dart b/examples/layers/widgets/styled_text.dart
index 633d55e..ffabd25 100644
--- a/examples/layers/widgets/styled_text.dart
+++ b/examples/layers/widgets/styled_text.dart
@@ -29,7 +29,7 @@
 const TextStyle _kUnderline = TextStyle(
   decoration: TextDecoration.underline,
   decorationColor: Color(0xFF000000),
-  decorationStyle: TextDecorationStyle.wavy
+  decorationStyle: TextDecorationStyle.wavy,
 );
 
 Widget toStyledText(String name, String text) {
@@ -44,14 +44,14 @@
           children: <TextSpan>[
             TextSpan(
               style: _kUnderline,
-              text: name
+              text: name,
             ),
-            const TextSpan(text: ':')
-          ]
+            const TextSpan(text: ':'),
+          ],
         ),
-        TextSpan(text: text)
-      ]
-    )
+        TextSpan(text: text),
+      ],
+    ),
   );
 }
 
@@ -67,7 +67,7 @@
         border: Border(
           bottom: BorderSide(color: Color.fromARGB(24, 0, 0, 0))
         )
-      )
+      ),
     );
   }
 }
@@ -112,9 +112,9 @@
         child: Column(
           children: children,
           mainAxisAlignment: MainAxisAlignment.center,
-          crossAxisAlignment: CrossAxisAlignment.start
-        )
-      )
+          crossAxisAlignment: CrossAxisAlignment.start,
+        ),
+      ),
     );
   }
 }
@@ -124,12 +124,12 @@
     theme: ThemeData.light(),
     home: Scaffold(
       appBar: AppBar(
-        title: const Text('Hal and Dave')
+        title: const Text('Hal and Dave'),
       ),
       body: Material(
         color: Colors.grey.shade50,
-        child: StyledTextDemo()
-      )
-    )
+        child: StyledTextDemo(),
+      ),
+    ),
   ));
 }