Prepare examples for use_super_parameters (#100514)

This commit is contained in:
Michael Goderbauer
2022-03-29 12:53:08 -07:00
committed by GitHub
parent 195a1cc413
commit 91bcf4200e
23 changed files with 32 additions and 33 deletions

View File

@@ -39,7 +39,7 @@ class RenderDots extends RenderConstrainedBox {
}
class Dots extends SingleChildRenderObjectWidget {
const Dots({ Key? key, Widget? child }) : super(key: key, child: child);
const Dots({ super.key, super.child });
@override
RenderDots createRenderObject(BuildContext context) => RenderDots();

View File

@@ -56,7 +56,7 @@ class _GesturePainter extends CustomPainter {
}
class GestureDemo extends StatefulWidget {
const GestureDemo({Key? key}) : super(key: key);
const GestureDemo({super.key});
@override
GestureDemoState createState() => GestureDemoState();

View File

@@ -5,7 +5,7 @@
import 'package:flutter/material.dart';
class AdaptedListItem extends StatelessWidget {
const AdaptedListItem({ Key? key, required this.name }) : super(key: key);
const AdaptedListItem({ super.key, required this.name });
final String name;
@@ -26,7 +26,7 @@ class AdaptedListItem extends StatelessWidget {
}
class AdaptedGridItem extends StatelessWidget {
const AdaptedGridItem({ Key? key, required this.name }) : super(key: key);
const AdaptedGridItem({ super.key, required this.name });
final String name;
@@ -65,7 +65,7 @@ const double _kMaxTileWidth = 150.0;
const double _kGridViewBreakpoint = 450.0;
class AdaptiveContainer extends StatelessWidget {
const AdaptiveContainer({ Key? key, required this.names }) : super(key: key);
const AdaptiveContainer({ super.key, required this.names });
final List<String> names;

View File

@@ -16,7 +16,7 @@ RenderBoxToRenderSectorAdapter initCircle() {
}
class SectorApp extends StatefulWidget {
const SectorApp({Key? key}) : super(key: key);
const SectorApp({super.key});
@override
SectorAppState createState() => SectorAppState();

View File

@@ -17,7 +17,7 @@ void addFlexChildSolidColor(RenderFlex parent, Color backgroundColor, { int flex
// Solid color, Widget version
class Rectangle extends StatelessWidget {
const Rectangle(this.color, { Key? key }) : super(key: key);
const Rectangle(this.color, { super.key });
final Color color;

View File

@@ -5,7 +5,7 @@
import 'package:flutter/widgets.dart';
class SpinningSquare extends StatefulWidget {
const SpinningSquare({Key? key}) : super(key: key);
const SpinningSquare({super.key});
@override
State<SpinningSquare> createState() => _SpinningSquareState();

View File

@@ -58,7 +58,7 @@ Widget toStyledText(String name, String text) {
Widget toPlainText(String name, String text) => Text('$name:$text');
class SpeakerSeparator extends StatelessWidget {
const SpeakerSeparator({Key? key}) : super(key: key);
const SpeakerSeparator({super.key});
@override
Widget build(BuildContext context) {
@@ -75,7 +75,7 @@ class SpeakerSeparator extends StatelessWidget {
}
class StyledTextDemo extends StatefulWidget {
const StyledTextDemo({Key? key}) : super(key: key);
const StyledTextDemo({super.key});
@override
State<StyledTextDemo> createState() => _StyledTextDemoState();