Prepare more of dev for use_super_parameters (#101073)

This commit is contained in:
Michael Goderbauer
2022-03-30 14:05:05 -07:00
committed by GitHub
parent 75baed585e
commit ca2d60e8e2
109 changed files with 215 additions and 253 deletions

View File

@@ -14,7 +14,7 @@ Future<void> main() async {
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -29,7 +29,7 @@ class MyApp extends StatelessWidget {
}
class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);
const HomePage({super.key});
@override
State<HomePage> createState() => _HomePage();
@@ -55,7 +55,7 @@ class _HomePage extends State<HomePage> {
}
class SecondPage extends StatelessWidget {
const SecondPage({Key? key}) : super(key: key);
const SecondPage({super.key});
@override
Widget build(BuildContext context) {

View File

@@ -20,7 +20,7 @@ void main() {
}
class Home extends StatelessWidget {
const Home({Key? key}) : super(key: key);
const Home({super.key});
@override
Widget build(BuildContext context) {

View File

@@ -44,7 +44,7 @@ class FutureDataHandler {
FutureDataHandler driverDataHandler = FutureDataHandler();
class MotionEventsBody extends StatefulWidget {
const MotionEventsBody({Key? key}) : super(key: key);
const MotionEventsBody({super.key});
@override
State createState() => MotionEventsBodyState();
@@ -259,7 +259,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
}
class TouchEventDiff extends StatelessWidget {
const TouchEventDiff(this.originalEvent, this.synthesizedEvent, {Key? key}) : super(key: key);
const TouchEventDiff(this.originalEvent, this.synthesizedEvent, {super.key});
final Map<String, dynamic> originalEvent;
final Map<String, dynamic> synthesizedEvent;

View File

@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
//
/// A testing page has to override this in order to be put as one of the items in the main page.
abstract class PageWidget extends StatelessWidget {
const PageWidget(this.title, this.tileKey, {Key? key}) : super(key: key);
const PageWidget(this.title, this.tileKey, {super.key});
/// The title of the testing page
///

View File

@@ -18,7 +18,7 @@ class WindowManagerIntegrationsPage extends PageWidget {
}
class WindowManagerBody extends StatefulWidget {
const WindowManagerBody({Key? key}) : super(key: key);
const WindowManagerBody({super.key});
@override
State<WindowManagerBody> createState() => WindowManagerBodyState();

View File

@@ -4,7 +4,7 @@ publish_to: none
description: An integration test for embedded platform views
version: 1.0.0+1
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.17.0-0 <3.0.0'
dependencies:
flutter:

View File

@@ -19,7 +19,7 @@ void main() {
}
class TestApp extends StatefulWidget {
const TestApp({Key? key}) : super(key: key);
const TestApp({super.key});
@override
State<TestApp> createState() => _TestAppState();

View File

@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
class LogoScreen extends StatelessWidget {
const LogoScreen({Key? key}) : super(key: key);
const LogoScreen({super.key});
static const String _testSentinel = 'Running deferred code';

View File

@@ -15,7 +15,7 @@ void main() {
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -31,7 +31,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
const MyHomePage({super.key});
@override
MyHomePageState createState() => MyHomePageState();

View File

@@ -3,7 +3,7 @@ description: Integration test application for basic deferred components function
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.17.0-0 <3.0.0'
dependencies:
flutter:

View File

@@ -15,7 +15,7 @@ void main() {
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
State createState() => MyAppState();

View File

@@ -16,7 +16,7 @@ void runMainApp() {
}
class Flavor extends StatefulWidget {
const Flavor({Key? key}) : super(key: key);
const Flavor({super.key});
@override
State<Flavor> createState() => _FlavorState();

View File

@@ -15,12 +15,11 @@ class AndroidPlatformView extends StatelessWidget {
/// native view.
/// `viewType` identifies the type of Android view to create.
const AndroidPlatformView({
Key? key,
super.key,
this.onPlatformViewCreated,
this.useHybridComposition = false,
required this.viewType,
}) : assert(viewType != null),
super(key: key);
}) : assert(viewType != null);
/// The unique identifier for the view type to be embedded by this widget.
///

View File

@@ -21,7 +21,7 @@ void main() {
}
class Home extends StatelessWidget {
const Home({Key? key}) : super(key: key);
const Home({super.key});
@override
Widget build(BuildContext context) {

View File

@@ -27,7 +27,7 @@ class MotionEventsPage extends PageWidget {
}
class MotionEventsBody extends StatefulWidget {
const MotionEventsBody({Key? key}) : super(key: key);
const MotionEventsBody({super.key});
@override
State createState() => MotionEventsBodyState();
@@ -231,7 +231,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
}
class TouchEventDiff extends StatelessWidget {
const TouchEventDiff(this.originalEvent, this.synthesizedEvent, {Key? key}) : super(key: key);
const TouchEventDiff(this.originalEvent, this.synthesizedEvent, {super.key});
final Map<String, dynamic> originalEvent;
final Map<String, dynamic> synthesizedEvent;

View File

@@ -20,7 +20,7 @@ class NestedViewEventPage extends PageWidget {
}
class NestedViewEventBody extends StatefulWidget {
const NestedViewEventBody({Key? key}) : super(key: key);
const NestedViewEventBody({super.key});
@override
State<NestedViewEventBody> createState() => NestedViewEventBodyState();

View File

@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
//
/// A testing page has to override this in order to be put as one of the items in the main page.
abstract class PageWidget extends StatelessWidget {
const PageWidget(this.title, this.tileKey, {Key? key}) : super(key: key);
const PageWidget(this.title, this.tileKey, {super.key});
/// The title of the testing page
///

View File

@@ -4,7 +4,7 @@ publish_to: none
description: An integration test for hybrid composition on Android
version: 1.0.0+1
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.17.0-0 <3.0.0'
dependencies:
flutter:

View File

@@ -27,7 +27,7 @@ void main() {
///
/// Rewiring semantics is a signal to native IOS test that the test has passed.
class LifeCycleSpy extends StatefulWidget {
const LifeCycleSpy({Key? key}) : super(key: key);
const LifeCycleSpy({super.key});
@override
State<LifeCycleSpy> createState() => _LifeCycleSpyState();

View File

@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
// This widget is the root of your application.
@override
@@ -32,7 +32,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, this.title}) : super(key: key);
const MyHomePage({super.key, this.title});
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect

View File

@@ -12,7 +12,7 @@ void main() {
/// The main app entrance of the test
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -30,7 +30,7 @@ class MyApp extends StatelessWidget {
///
/// On press the button, a page with platform view should be pushed into the scene.
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, this.title}) : super(key: key);
const MyHomePage({super.key, this.title});
final String? title;
@override
@@ -69,7 +69,7 @@ class _MyHomePageState extends State<MyHomePage> {
/// A page contains the platform view to be tested.
class PlatformViewPage extends StatelessWidget {
const PlatformViewPage({Key? key}) : super(key: key);
const PlatformViewPage({super.key});
static Key button = const ValueKey<String>('plus_button');

View File

@@ -16,7 +16,7 @@ void main() {
}
class TestApp extends StatefulWidget {
const TestApp({Key? key}) : super(key: key);
const TestApp({super.key});
@override
State<TestApp> createState() => _TestAppState();

View File

@@ -11,7 +11,7 @@ void main() {
}
class Test extends SingleChildRenderObjectWidget {
const Test({ Key? key }) : super(key: key);
const Test({ super.key });
@override
RenderTest createRenderObject(BuildContext context) => RenderTest();

View File

@@ -11,7 +11,7 @@ void main() {
}
class DriverTestApp extends StatefulWidget {
const DriverTestApp({Key? key}) : super(key: key);
const DriverTestApp({super.key});
@override
State<StatefulWidget> createState() {

View File

@@ -12,7 +12,7 @@ void main() {
}
class Empty extends StatelessWidget {
const Empty({Key? key}) : super(key: key);
const Empty({super.key});
@override
Widget build(BuildContext context) => Container();

View File

@@ -26,9 +26,8 @@ void main() {
class _FirstFrameTimings extends StatefulWidget {
const _FirstFrameTimings({
Key? key,
required this.completer,
}) : super(key: key);
});
final Completer<List<FrameTiming>> completer;

View File

@@ -16,7 +16,7 @@ void main() {
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -29,7 +29,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();

View File

@@ -14,7 +14,7 @@ void main() {
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -27,7 +27,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();

View File

@@ -14,7 +14,7 @@ void main() {
}
class ShowLicenses extends StatelessWidget {
const ShowLicenses({Key? key}) : super(key: key);
const ShowLicenses({super.key});
Widget _buildTestResultWidget(
BuildContext context,

View File

@@ -9,7 +9,7 @@ void main() {
}
class Test extends StatefulWidget {
const Test({ Key? key }) : super(key: key);
const Test({ super.key });
@override
State<Test> createState() => _TestState();

View File

@@ -16,7 +16,7 @@ void main() {
}
class Toggler extends StatefulWidget {
const Toggler({Key? key}) : super(key: key);
const Toggler({super.key});
@override
State<Toggler> createState() => TogglerState();

View File

@@ -62,7 +62,7 @@ bool _errorMessageFormattedCorrectly(String errorMessage) {
}
class ThrowingWidget extends StatefulWidget {
const ThrowingWidget({Key? key}) : super(key: key);
const ThrowingWidget({super.key});
@override
State<ThrowingWidget> createState() => _ThrowingWidgetState();

View File

@@ -1,6 +1,6 @@
name: web_compile_tests
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.17.0-0 <3.0.0'
dependencies:
flutter:

View File

@@ -27,7 +27,7 @@ Future<void> main() async {
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
MyAppState createState() => MyAppState();

View File

@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -20,7 +20,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;

View File

@@ -9,7 +9,7 @@ void main() {
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
MyAppState createState() => MyAppState();

View File

@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
// This widget is the root of your application.
@override
@@ -27,7 +27,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;

View File

@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -21,7 +21,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {

View File

@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -20,7 +20,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, this.title}) : super(key: key);
const MyHomePage({super.key, this.title});
final String? title;

View File

@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -20,7 +20,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;

View File

@@ -16,7 +16,7 @@ void main() {
}
class MyApp extends StatelessWidget {
const MyApp(this.routes, {Key? key}) : super(key: key);
const MyApp(this.routes, {super.key});
final Map<String, WidgetBuilder> routes;