Prepare more of dev for use_super_parameters (#101073)
This commit is contained in:
committed by
GitHub
parent
75baed585e
commit
ca2d60e8e2
@@ -310,7 +310,7 @@ class UndoableDirectionalFocusAction extends UndoableFocusActionBase<Directional
|
||||
|
||||
/// A button class that takes focus when clicked.
|
||||
class DemoButton extends StatefulWidget {
|
||||
const DemoButton({Key? key, required this.name}) : super(key: key);
|
||||
const DemoButton({super.key, required this.name});
|
||||
|
||||
final String name;
|
||||
|
||||
@@ -356,7 +356,7 @@ class _DemoButtonState extends State<DemoButton> {
|
||||
}
|
||||
|
||||
class FocusDemo extends StatefulWidget {
|
||||
const FocusDemo({Key? key}) : super(key: key);
|
||||
const FocusDemo({super.key});
|
||||
|
||||
static GlobalKey appKey = GlobalKey();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AnimatedIconsTestApp extends StatelessWidget {
|
||||
const AnimatedIconsTestApp({Key? key}) : super(key: key);
|
||||
const AnimatedIconsTestApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -19,7 +19,7 @@ class AnimatedIconsTestApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class IconsList extends StatelessWidget {
|
||||
const IconsList({Key? key}) : super(key: key);
|
||||
const IconsList({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -30,7 +30,7 @@ class IconsList extends StatelessWidget {
|
||||
}
|
||||
|
||||
class IconSampleRow extends StatefulWidget {
|
||||
const IconSampleRow(this.sample, {Key? key}) : super(key: key);
|
||||
const IconSampleRow(this.sample, {super.key});
|
||||
|
||||
final IconSample sample;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class CardModel {
|
||||
}
|
||||
|
||||
class CardCollection extends StatefulWidget {
|
||||
const CardCollection({Key? key}) : super(key: key);
|
||||
const CardCollection({super.key});
|
||||
|
||||
@override
|
||||
CardCollectionState createState() => CardCollectionState();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ColorTestingDemo extends StatelessWidget {
|
||||
const ColorTestingDemo({ Key? key }) : super(key: key);
|
||||
const ColorTestingDemo({ super.key });
|
||||
|
||||
static const String routeName = '/color_demo';
|
||||
|
||||
@@ -14,7 +14,7 @@ class ColorTestingDemo extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ColorDemoHome extends StatelessWidget {
|
||||
const ColorDemoHome({Key? key}) : super(key: key);
|
||||
const ColorDemoHome({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -52,7 +52,7 @@ class ColorDemoHome extends StatelessWidget {
|
||||
}
|
||||
|
||||
class GradientRow extends StatelessWidget {
|
||||
const GradientRow({ Key? key, required this.rightColor, required this.leftColor }) : super(key: key);
|
||||
const GradientRow({ super.key, required this.rightColor, required this.leftColor });
|
||||
|
||||
final Color leftColor;
|
||||
final Color rightColor;
|
||||
@@ -73,7 +73,7 @@ class GradientRow extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ColorRow extends StatelessWidget {
|
||||
const ColorRow({ Key? key, required this.color }) : super(key: key);
|
||||
const ColorRow({ super.key, required this.color });
|
||||
|
||||
final Color color;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ final MaterialColor m2Swatch = MaterialColor(m2SwatchColors[500]!.value, m2Swatc
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Density Test';
|
||||
|
||||
@@ -36,7 +36,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, required this.title}) : super(key: key);
|
||||
const MyHomePage({super.key, required this.title});
|
||||
|
||||
final String title;
|
||||
|
||||
@@ -112,7 +112,7 @@ class OptionModel extends ChangeNotifier {
|
||||
}
|
||||
|
||||
class LabeledCheckbox extends StatelessWidget {
|
||||
const LabeledCheckbox({Key? key, required this.label, this.onChanged, this.value}) : super(key: key);
|
||||
const LabeledCheckbox({super.key, required this.label, this.onChanged, this.value});
|
||||
|
||||
final String label;
|
||||
final ValueChanged<bool?>? onChanged;
|
||||
@@ -134,7 +134,7 @@ class LabeledCheckbox extends StatelessWidget {
|
||||
}
|
||||
|
||||
class Options extends StatefulWidget {
|
||||
const Options(this.model, {Key? key}) : super(key: key);
|
||||
const Options(this.model, {super.key});
|
||||
|
||||
final OptionModel model;
|
||||
|
||||
@@ -365,10 +365,9 @@ class _OptionsState extends State<Options> {
|
||||
}
|
||||
|
||||
class _ControlTile extends StatelessWidget {
|
||||
const _ControlTile({Key? key, required this.label, required this.child})
|
||||
const _ControlTile({required this.label, required this.child})
|
||||
: assert(label != null),
|
||||
assert(child != null),
|
||||
super(key: key);
|
||||
assert(child != null);
|
||||
|
||||
final String label;
|
||||
final Widget child;
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'dart:math' as math;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ExampleDragTarget extends StatefulWidget {
|
||||
const ExampleDragTarget({Key? key}) : super(key: key);
|
||||
const ExampleDragTarget({super.key});
|
||||
|
||||
@override
|
||||
ExampleDragTargetState createState() => ExampleDragTargetState();
|
||||
@@ -44,7 +44,7 @@ class ExampleDragTargetState extends State<ExampleDragTarget> {
|
||||
}
|
||||
|
||||
class Dot extends StatefulWidget {
|
||||
const Dot({ Key? key, this.color, this.size, this.child, this.tappable = false }) : super(key: key);
|
||||
const Dot({ super.key, this.color, this.size, this.child, this.tappable = false });
|
||||
|
||||
final Color? color;
|
||||
final double? size;
|
||||
@@ -77,12 +77,12 @@ class DotState extends State<Dot> {
|
||||
|
||||
class ExampleDragSource extends StatelessWidget {
|
||||
const ExampleDragSource({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.color,
|
||||
this.heavy = false,
|
||||
this.under = true,
|
||||
this.child,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Color? color;
|
||||
final bool heavy;
|
||||
@@ -176,7 +176,7 @@ class DashOutlineCirclePainter extends CustomPainter {
|
||||
}
|
||||
|
||||
class MovableBall extends StatelessWidget {
|
||||
const MovableBall(this.position, this.ballPosition, this.callback, {Key? key}) : super(key: key);
|
||||
const MovableBall(this.position, this.ballPosition, this.callback, {super.key});
|
||||
|
||||
final int position;
|
||||
final int ballPosition;
|
||||
@@ -225,7 +225,7 @@ class MovableBall extends StatelessWidget {
|
||||
}
|
||||
|
||||
class DragAndDropApp extends StatefulWidget {
|
||||
const DragAndDropApp({Key? key}) : super(key: key);
|
||||
const DragAndDropApp({super.key});
|
||||
|
||||
@override
|
||||
DragAndDropAppState createState() => DragAndDropAppState();
|
||||
|
||||
@@ -13,7 +13,7 @@ void main() {
|
||||
}
|
||||
|
||||
class DemoButton extends StatefulWidget {
|
||||
const DemoButton({Key? key, required this.name, this.canRequestFocus = true, this.autofocus = false}) : super(key: key);
|
||||
const DemoButton({super.key, required this.name, this.canRequestFocus = true, this.autofocus = false});
|
||||
|
||||
final String name;
|
||||
final bool canRequestFocus;
|
||||
@@ -68,7 +68,7 @@ class _DemoButtonState extends State<DemoButton> {
|
||||
}
|
||||
|
||||
class FocusDemo extends StatefulWidget {
|
||||
const FocusDemo({Key? key}) : super(key: key);
|
||||
const FocusDemo({super.key});
|
||||
|
||||
@override
|
||||
State<FocusDemo> createState() => _FocusDemoState();
|
||||
|
||||
@@ -12,7 +12,7 @@ void main() {
|
||||
}
|
||||
|
||||
class DemoButton extends StatelessWidget {
|
||||
const DemoButton({Key? key, required this.name}) : super(key: key);
|
||||
const DemoButton({super.key, required this.name});
|
||||
|
||||
final String name;
|
||||
|
||||
@@ -30,7 +30,7 @@ class DemoButton extends StatelessWidget {
|
||||
}
|
||||
|
||||
class HoverDemo extends StatefulWidget {
|
||||
const HoverDemo({Key? key}) : super(key: key);
|
||||
const HoverDemo({super.key});
|
||||
|
||||
@override
|
||||
State<HoverDemo> createState() => _HoverDemoState();
|
||||
|
||||
@@ -101,7 +101,7 @@ class _PointDemoPainter extends CustomPainter {
|
||||
}
|
||||
|
||||
class _PointDemo extends StatefulWidget {
|
||||
const _PointDemo({ Key? key, required this.controller }) : super(key: key);
|
||||
const _PointDemo({ super.key, required this.controller });
|
||||
|
||||
final AnimationController controller;
|
||||
|
||||
@@ -268,7 +268,7 @@ class _RectangleDemoPainter extends CustomPainter {
|
||||
}
|
||||
|
||||
class _RectangleDemo extends StatefulWidget {
|
||||
const _RectangleDemo({ Key? key, required this.controller }) : super(key: key);
|
||||
const _RectangleDemo({ super.key, required this.controller });
|
||||
|
||||
final AnimationController controller;
|
||||
|
||||
@@ -400,7 +400,7 @@ class _ArcDemo {
|
||||
}
|
||||
|
||||
class AnimationDemo extends StatefulWidget {
|
||||
const AnimationDemo({ Key? key }) : super(key: key);
|
||||
const AnimationDemo({ super.key });
|
||||
|
||||
@override
|
||||
State<AnimationDemo> createState() => _AnimationDemoState();
|
||||
|
||||
@@ -56,11 +56,11 @@ class _MarkerPainter extends CustomPainter {
|
||||
|
||||
class Marker extends StatelessWidget {
|
||||
const Marker({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.type = MarkerType.touch,
|
||||
this.position,
|
||||
this.size = 40.0,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Offset? position;
|
||||
final double size;
|
||||
@@ -86,7 +86,7 @@ class Marker extends StatelessWidget {
|
||||
}
|
||||
|
||||
class OverlayGeometryApp extends StatefulWidget {
|
||||
const OverlayGeometryApp({Key? key}) : super(key: key);
|
||||
const OverlayGeometryApp({super.key});
|
||||
|
||||
@override
|
||||
OverlayGeometryAppState createState() => OverlayGeometryAppState();
|
||||
|
||||
@@ -14,7 +14,7 @@ class CardModel {
|
||||
}
|
||||
|
||||
class PageViewApp extends StatefulWidget {
|
||||
const PageViewApp({Key? key}) : super(key: key);
|
||||
const PageViewApp({super.key});
|
||||
|
||||
@override
|
||||
PageViewAppState createState() => PageViewAppState();
|
||||
|
||||
@@ -20,7 +20,7 @@ void main() {
|
||||
}
|
||||
|
||||
class RawKeyboardDemo extends StatefulWidget {
|
||||
const RawKeyboardDemo({Key? key}) : super(key: key);
|
||||
const RawKeyboardDemo({super.key});
|
||||
|
||||
@override
|
||||
State<RawKeyboardDemo> createState() => _HardwareKeyDemoState();
|
||||
|
||||
@@ -26,7 +26,7 @@ void main() {
|
||||
}
|
||||
|
||||
class Home extends StatefulWidget {
|
||||
const Home({ Key? key }) : super(key: key);
|
||||
const Home({ super.key });
|
||||
|
||||
@override
|
||||
State<Home> createState() => _HomeState();
|
||||
@@ -118,7 +118,7 @@ class _HomeState extends State<Home> {
|
||||
}
|
||||
|
||||
class Fuzzer extends StatefulWidget {
|
||||
const Fuzzer({ Key? key, required this.seed }) : super(key: key);
|
||||
const Fuzzer({ super.key, required this.seed });
|
||||
|
||||
final int seed;
|
||||
|
||||
@@ -534,7 +534,7 @@ class _FuzzerState extends State<Fuzzer> with SingleTickerProviderStateMixin {
|
||||
}
|
||||
|
||||
class Underlines extends StatefulWidget {
|
||||
const Underlines({ Key? key }) : super(key: key);
|
||||
const Underlines({ super.key });
|
||||
|
||||
@override
|
||||
State<Underlines> createState() => _UnderlinesState();
|
||||
@@ -639,7 +639,7 @@ class _UnderlinesState extends State<Underlines> {
|
||||
}
|
||||
|
||||
class Fallback extends StatefulWidget {
|
||||
const Fallback({ Key? key }) : super(key: key);
|
||||
const Fallback({ super.key });
|
||||
|
||||
@override
|
||||
State<Fallback> createState() => _FallbackState();
|
||||
@@ -734,7 +734,7 @@ class _FallbackState extends State<Fallback> {
|
||||
}
|
||||
|
||||
class Bidi extends StatefulWidget {
|
||||
const Bidi({ Key? key }) : super(key: key);
|
||||
const Bidi({ super.key });
|
||||
|
||||
@override
|
||||
State<Bidi> createState() => _BidiState();
|
||||
@@ -809,7 +809,7 @@ class _BidiState extends State<Bidi> {
|
||||
}
|
||||
|
||||
class Zalgo extends StatefulWidget {
|
||||
const Zalgo({ Key? key, required this.seed }) : super(key: key);
|
||||
const Zalgo({ super.key, required this.seed });
|
||||
|
||||
final int seed;
|
||||
|
||||
@@ -915,7 +915,7 @@ class _ZalgoState extends State<Zalgo> with SingleTickerProviderStateMixin {
|
||||
}
|
||||
|
||||
class Painting extends StatefulWidget {
|
||||
const Painting({ Key? key, required this.seed }) : super(key: key);
|
||||
const Painting({ super.key, required this.seed });
|
||||
|
||||
final int seed;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user