From ca2d60e8e2344d8c0ed938869f7c974cb745e841 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Wed, 30 Mar 2022 14:05:05 -0700 Subject: [PATCH] Prepare more of `dev` for use_super_parameters (#101073) --- dev/benchmarks/complex_layout/lib/main.dart | 40 +++++++++---------- dev/benchmarks/macrobenchmarks/lib/main.dart | 4 +- .../lib/src/animated_image.dart | 2 +- .../lib/src/animated_placeholder.dart | 2 +- .../lib/src/animation_with_microtasks.dart | 2 +- .../lib/src/backdrop_filter.dart | 2 +- .../lib/src/color_filter_and_fade.dart | 2 +- .../lib/src/color_filter_cache.dart | 2 +- .../macrobenchmarks/lib/src/cubic_bezier.dart | 6 +-- .../macrobenchmarks/lib/src/cull_opacity.dart | 2 +- .../lib/src/filtered_child_animation.dart | 4 +- .../lib/src/fullscreen_textfield.dart | 2 +- .../lib/src/heavy_grid_view.dart | 2 +- .../lib/src/large_image_changer.dart | 2 +- .../macrobenchmarks/lib/src/large_images.dart | 2 +- .../lib/src/multi_widget_construction.dart | 6 +-- .../lib/src/opacity_peephole.dart | 4 +- .../lib/src/picture_cache.dart | 5 +-- .../src/picture_cache_complexity_scoring.dart | 2 +- .../lib/src/post_backdrop_filter.dart | 2 +- .../lib/src/shader_mask_cache.dart | 2 +- .../lib/src/simple_animation.dart | 2 +- .../lib/src/simple_scroll.dart | 2 +- .../macrobenchmarks/lib/src/stack_size.dart | 6 +-- .../macrobenchmarks/lib/src/text.dart | 2 +- .../lib/src/web/bench_build_image.dart | 2 +- .../src/web/bench_card_infinite_scroll.dart | 2 +- .../src/web/bench_link_infinite_scroll.dart | 2 +- .../bench_pageview_scroll_linethrough.dart | 2 +- .../lib/src/web/bench_text_layout.dart | 11 +++-- .../lib/src/web/bench_wrapbox_scroll.dart | 8 ++-- .../lib/gestures/apps/button_matrix_app.dart | 2 +- .../multiple_flutters/module/lib/main.dart | 4 +- .../lib/main.dart | 2 +- .../stocks/lib/i18n/stock_strings_en.dart | 2 +- .../stocks/lib/i18n/stock_strings_es.dart | 2 +- dev/benchmarks/test_apps/stocks/lib/main.dart | 2 +- .../test_apps/stocks/lib/stock_arrow.dart | 2 +- .../test_apps/stocks/lib/stock_home.dart | 2 +- .../test_apps/stocks/lib/stock_list.dart | 4 +- .../test_apps/stocks/lib/stock_settings.dart | 2 +- .../stocks/lib/stock_symbol_viewer.dart | 8 ++-- dev/conductor/core/lib/src/next.dart | 9 ++--- dev/conductor/core/lib/src/repository.dart | 36 ++++++----------- dev/conductor/core/lib/src/start.dart | 8 +--- dev/conductor/core/test/codesign_test.dart | 7 ++-- dev/conductor/core/test/next_test.dart | 13 ++---- dev/customer_testing/pubspec.yaml | 2 +- dev/forbidden_from_release_tests/pubspec.yaml | 2 +- .../abstract_method_smoke_test/lib/main.dart | 6 +-- .../android_views/lib/main.dart | 2 +- .../android_views/lib/motion_events_page.dart | 4 +- .../android_views/lib/page.dart | 2 +- .../android_views/lib/wm_integrations.dart | 2 +- .../android_views/pubspec.yaml | 2 +- dev/integration_tests/channels/lib/main.dart | 2 +- .../lib/component1.dart | 2 +- .../deferred_components_test/lib/main.dart | 4 +- .../deferred_components_test/pubspec.yaml | 2 +- .../external_ui/lib/main.dart | 2 +- dev/integration_tests/flavors/lib/main.dart | 2 +- .../lib/android_platform_view.dart | 5 +-- .../hybrid_android_views/lib/main.dart | 2 +- .../lib/motion_events_page.dart | 4 +- .../lib/nested_view_event_page.dart | 2 +- .../hybrid_android_views/lib/page.dart | 2 +- .../hybrid_android_views/pubspec.yaml | 2 +- .../flutterapp/lib/main.dart | 2 +- .../ios_app_with_extensions/lib/main.dart | 4 +- .../ios_platform_view_tests/lib/main.dart | 6 +-- .../platform_interaction/lib/main.dart | 2 +- dev/integration_tests/ui/lib/commands.dart | 2 +- dev/integration_tests/ui/lib/driver.dart | 2 +- dev/integration_tests/ui/lib/empty.dart | 2 +- .../ui/lib/frame_number.dart | 3 +- .../ui/lib/keyboard_resize.dart | 4 +- .../ui/lib/keyboard_textfield.dart | 4 +- .../ui/lib/license_check.dart | 2 +- dev/integration_tests/ui/lib/overflow.dart | 2 +- dev/integration_tests/ui/lib/screenshot.dart | 2 +- .../web/lib/framework_stack_trace.dart | 2 +- .../web_compile_tests/pubspec.yaml | 2 +- .../web_e2e_tests/lib/image_loading_main.dart | 2 +- .../lib/platform_messages_main.dart | 4 +- .../lib/profile_diagnostics_main.dart | 2 +- .../web_e2e_tests/lib/scroll_wheel_main.dart | 4 +- .../lib/target_platform_main.dart | 4 +- .../web_e2e_tests/lib/text_editing_main.dart | 4 +- .../web_e2e_tests/lib/treeshaking_main.dart | 4 +- .../web_e2e_tests/lib/url_strategy_main.dart | 2 +- dev/manual_tests/lib/actions.dart | 4 +- dev/manual_tests/lib/animated_icons.dart | 6 +-- dev/manual_tests/lib/card_collection.dart | 2 +- dev/manual_tests/lib/color_testing_demo.dart | 8 ++-- dev/manual_tests/lib/density.dart | 13 +++--- dev/manual_tests/lib/drag_and_drop.dart | 12 +++--- dev/manual_tests/lib/focus.dart | 4 +- dev/manual_tests/lib/hover.dart | 4 +- dev/manual_tests/lib/material_arc.dart | 6 +-- dev/manual_tests/lib/overlay_geometry.dart | 6 +-- dev/manual_tests/lib/page_view.dart | 2 +- dev/manual_tests/lib/raw_keyboard.dart | 2 +- dev/manual_tests/lib/text.dart | 14 +++---- dev/tools/gen_defaults/lib/card_template.dart | 2 +- .../gen_defaults/lib/dialog_template.dart | 5 +-- dev/tools/gen_defaults/lib/fab_template.dart | 5 +-- .../lib/navigation_bar_template.dart | 5 +-- .../lib/navigation_rail_template.dart | 5 +-- dev/tools/pubspec.yaml | 2 +- 109 files changed, 215 insertions(+), 253 deletions(-) diff --git a/dev/benchmarks/complex_layout/lib/main.dart b/dev/benchmarks/complex_layout/lib/main.dart index 65f289edaf1..5139d9cc708 100644 --- a/dev/benchmarks/complex_layout/lib/main.dart +++ b/dev/benchmarks/complex_layout/lib/main.dart @@ -14,7 +14,7 @@ void main() { enum ScrollMode { complex, tile } class ComplexLayoutApp extends StatefulWidget { - const ComplexLayoutApp({Key? key}) : super(key: key); + const ComplexLayoutApp({super.key}); @override ComplexLayoutAppState createState() => ComplexLayoutAppState(); @@ -55,7 +55,7 @@ class ComplexLayoutAppState extends State { } class TileScrollLayout extends StatelessWidget { - const TileScrollLayout({ Key? key }) : super(key: key); + const TileScrollLayout({ super.key }); @override Widget build(BuildContext context) { @@ -81,7 +81,7 @@ class TileScrollLayout extends StatelessWidget { } class ComplexLayout extends StatefulWidget { - const ComplexLayout({ Key? key }) : super(key: key); + const ComplexLayout({ super.key }); @override ComplexLayoutState createState() => ComplexLayoutState(); @@ -129,7 +129,7 @@ class ComplexLayoutState extends State { } class TopBarMenu extends StatelessWidget { - const TopBarMenu({Key? key}) : super(key: key); + const TopBarMenu({super.key}); @override Widget build(BuildContext context) { @@ -182,7 +182,7 @@ class TopBarMenu extends StatelessWidget { } class MenuItemWithIcon extends StatelessWidget { - const MenuItemWithIcon(this.icon, this.title, this.subtitle, {Key? key}) : super(key: key); + const MenuItemWithIcon(this.icon, this.title, this.subtitle, {super.key}); final IconData icon; final String title; @@ -204,7 +204,7 @@ class MenuItemWithIcon extends StatelessWidget { } class FancyImageItem extends StatelessWidget { - const FancyImageItem(this.index, {Key? key}) : super(key: key); + const FancyImageItem(this.index, {super.key}); final int index; @@ -228,7 +228,7 @@ class FancyImageItem extends StatelessWidget { } class FancyGalleryItem extends StatelessWidget { - const FancyGalleryItem(this.index, {Key? key}) : super(key: key); + const FancyGalleryItem(this.index, {super.key}); final int index; @override @@ -250,7 +250,7 @@ class FancyGalleryItem extends StatelessWidget { } class InfoBar extends StatelessWidget { - const InfoBar({Key? key}) : super(key: key); + const InfoBar({super.key}); @override Widget build(BuildContext context) { @@ -268,7 +268,7 @@ class InfoBar extends StatelessWidget { } class IconBar extends StatelessWidget { - const IconBar({Key? key}) : super(key: key); + const IconBar({super.key}); @override Widget build(BuildContext context) { @@ -287,7 +287,7 @@ class IconBar extends StatelessWidget { } class IconWithText extends StatelessWidget { - const IconWithText(this.icon, this.title, {Key? key}) : super(key: key); + const IconWithText(this.icon, this.title, {super.key}); final IconData icon; final String title; @@ -308,7 +308,7 @@ class IconWithText extends StatelessWidget { } class MiniIconWithText extends StatelessWidget { - const MiniIconWithText(this.icon, this.title, {Key? key}) : super(key: key); + const MiniIconWithText(this.icon, this.title, {super.key}); final IconData icon; final String title; @@ -337,7 +337,7 @@ class MiniIconWithText extends StatelessWidget { } class FatDivider extends StatelessWidget { - const FatDivider({Key? key}) : super(key: key); + const FatDivider({super.key}); @override Widget build(BuildContext context) { @@ -349,7 +349,7 @@ class FatDivider extends StatelessWidget { } class UserHeader extends StatelessWidget { - const UserHeader(this.userName, {Key? key}) : super(key: key); + const UserHeader(this.userName, {super.key}); final String userName; @@ -397,7 +397,7 @@ class UserHeader extends StatelessWidget { } class ItemDescription extends StatelessWidget { - const ItemDescription({Key? key}) : super(key: key); + const ItemDescription({super.key}); @override Widget build(BuildContext context) { @@ -409,7 +409,7 @@ class ItemDescription extends StatelessWidget { } class ItemImageBox extends StatelessWidget { - const ItemImageBox({Key? key}) : super(key: key); + const ItemImageBox({super.key}); @override Widget build(BuildContext context) { @@ -490,7 +490,7 @@ class ItemImageBox extends StatelessWidget { } class ItemGalleryBox extends StatelessWidget { - const ItemGalleryBox(this.index, {Key? key}) : super(key: key); + const ItemGalleryBox(this.index, {super.key}); final int index; @@ -559,7 +559,7 @@ class ItemGalleryBox extends StatelessWidget { } class BottomBar extends StatelessWidget { - const BottomBar({Key? key}) : super(key: key); + const BottomBar({super.key}); @override Widget build(BuildContext context) { @@ -586,7 +586,7 @@ class BottomBar extends StatelessWidget { } class BottomBarButton extends StatelessWidget { - const BottomBarButton(this.icon, this.title, {Key? key}) : super(key: key); + const BottomBarButton(this.icon, this.title, {super.key}); final IconData icon; final String title; @@ -609,7 +609,7 @@ class BottomBarButton extends StatelessWidget { } class GalleryDrawer extends StatelessWidget { - const GalleryDrawer({ Key? key }) : super(key: key); + const GalleryDrawer({ super.key }); void _changeTheme(BuildContext context, bool value) { ComplexLayoutApp.of(context)?.lightTheme = value; @@ -680,7 +680,7 @@ class GalleryDrawer extends StatelessWidget { } class FancyDrawerHeader extends StatelessWidget { - const FancyDrawerHeader({Key? key}) : super(key: key); + const FancyDrawerHeader({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/main.dart b/dev/benchmarks/macrobenchmarks/lib/main.dart index 9670bc093d5..da57c9087f4 100644 --- a/dev/benchmarks/macrobenchmarks/lib/main.dart +++ b/dev/benchmarks/macrobenchmarks/lib/main.dart @@ -35,7 +35,7 @@ const String kMacrobenchmarks = 'Macrobenchmarks'; void main() => runApp(const MacrobenchmarksApp()); class MacrobenchmarksApp extends StatelessWidget { - const MacrobenchmarksApp({Key? key, this.initialRoute = '/'}) : super(key: key); + const MacrobenchmarksApp({super.key, this.initialRoute = '/'}); @override Widget build(BuildContext context) { @@ -77,7 +77,7 @@ class MacrobenchmarksApp extends StatelessWidget { } class HomePage extends StatelessWidget { - const HomePage({Key? key}) : super(key: key); + const HomePage({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/animated_image.dart b/dev/benchmarks/macrobenchmarks/lib/src/animated_image.dart index bc984fcf320..7dce5b63865 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/animated_image.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/animated_image.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class AnimatedImagePage extends StatelessWidget { - const AnimatedImagePage({Key? key, this.onFrame}) : super(key: key); + const AnimatedImagePage({super.key, this.onFrame}); final ValueChanged? onFrame; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/animated_placeholder.dart b/dev/benchmarks/macrobenchmarks/lib/src/animated_placeholder.dart index 89b23a40dc8..c940bf255ad 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/animated_placeholder.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/animated_placeholder.dart @@ -24,7 +24,7 @@ const String kBlueSquare = 'iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAASEl' /// A 10x10 grid of animated looping placeholder gifts that fade into a /// blue square. class AnimatedPlaceholderPage extends StatelessWidget { - const AnimatedPlaceholderPage({Key? key}) : super(key: key); + const AnimatedPlaceholderPage({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/animation_with_microtasks.dart b/dev/benchmarks/macrobenchmarks/lib/src/animation_with_microtasks.dart index 83cd77add27..b74fa09cb58 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/animation_with_microtasks.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/animation_with_microtasks.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class AnimationWithMicrotasks extends StatefulWidget { - const AnimationWithMicrotasks({Key? key}) : super(key: key); + const AnimationWithMicrotasks({super.key}); @override State createState() => _AnimationWithMicrotasksState(); diff --git a/dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart b/dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart index 7c2ce6dbe2d..7fa1133b18b 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart @@ -7,7 +7,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; class BackdropFilterPage extends StatefulWidget { - const BackdropFilterPage({Key? key}) : super(key: key); + const BackdropFilterPage({super.key}); @override State createState() => _BackdropFilterPageState(); diff --git a/dev/benchmarks/macrobenchmarks/lib/src/color_filter_and_fade.dart b/dev/benchmarks/macrobenchmarks/lib/src/color_filter_and_fade.dart index eb7d854e3b0..d32c1ffd8bd 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/color_filter_and_fade.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/color_filter_and_fade.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; // This tests whether the Opacity layer raster cache works with color filters. // See https://github.com/flutter/flutter/issues/51975. class ColorFilterAndFadePage extends StatefulWidget { - const ColorFilterAndFadePage({Key? key}) : super(key: key); + const ColorFilterAndFadePage({super.key}); @override State createState() => _ColorFilterAndFadePageState(); diff --git a/dev/benchmarks/macrobenchmarks/lib/src/color_filter_cache.dart b/dev/benchmarks/macrobenchmarks/lib/src/color_filter_cache.dart index 4bedf652dd2..9c48efbbe74 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/color_filter_cache.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/color_filter_cache.dart @@ -7,7 +7,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; class ColorFilterCachePage extends StatefulWidget { - const ColorFilterCachePage({Key? key}) : super(key: key); + const ColorFilterCachePage({super.key}); @override State createState() => _ColorFilterCachePageState(); } diff --git a/dev/benchmarks/macrobenchmarks/lib/src/cubic_bezier.dart b/dev/benchmarks/macrobenchmarks/lib/src/cubic_bezier.dart index 9bb941ba3fd..2f33c86d0e6 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/cubic_bezier.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/cubic_bezier.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; // Based on https://github.com/eseidelGoogle/bezier_perf/blob/master/lib/main.dart class CubicBezierPage extends StatelessWidget { - const CubicBezierPage({Key? key}) : super(key: key); + const CubicBezierPage({super.key}); @override Widget build(BuildContext context) { @@ -24,7 +24,7 @@ class CubicBezierPage extends StatelessWidget { } class Bezier extends StatelessWidget { - const Bezier(this.color, this.scale, {Key? key, this.blur = 0.0, this.delay = 0.0}) : super(key: key); + const Bezier(this.color, this.scale, {super.key, this.blur = 0.0, this.delay = 0.0}); final Color color; final double scale; @@ -93,7 +93,7 @@ class PathDetail { } class AnimatedBezier extends StatefulWidget { - const AnimatedBezier(this.color, this.scale, {Key? key, this.blur = 0.0}) : super(key: key); + const AnimatedBezier(this.color, this.scale, {super.key, this.blur = 0.0}); final Color color; final double scale; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/cull_opacity.dart b/dev/benchmarks/macrobenchmarks/lib/src/cull_opacity.dart index 5b456c5b0b5..7eb04aedf23 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/cull_opacity.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/cull_opacity.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class CullOpacityPage extends StatefulWidget { - const CullOpacityPage({Key? key}) : super(key: key); + const CullOpacityPage({super.key}); @override State createState() => _CullOpacityPageState(); diff --git a/dev/benchmarks/macrobenchmarks/lib/src/filtered_child_animation.dart b/dev/benchmarks/macrobenchmarks/lib/src/filtered_child_animation.dart index 0c2c4492dcc..d9b080854fd 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/filtered_child_animation.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/filtered_child_animation.dart @@ -13,10 +13,10 @@ enum FilterType { class FilteredChildAnimationPage extends StatefulWidget { const FilteredChildAnimationPage(this.initialFilterType, { - Key? key, + super.key, this.initialComplexChild = true, this.initialUseRepaintBoundary = true, - }) : super(key: key); + }); final FilterType initialFilterType; final bool initialComplexChild; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/fullscreen_textfield.dart b/dev/benchmarks/macrobenchmarks/lib/src/fullscreen_textfield.dart index 305f59197bd..d67a46b0f67 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/fullscreen_textfield.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/fullscreen_textfield.dart @@ -48,7 +48,7 @@ const String textLotsOfText = 'Lorem ipsum dolor sit amet, consectetur ' 'ðŸĶŧ 👃 ðŸŦ€ ðŸŦ 🧠 ðŸĶ· ðŸĶī 👀 👁 👅 👄 💋 ðŸĐļ'; class TextFieldPage extends StatelessWidget { - const TextFieldPage({Key? key}) : super(key: key); + const TextFieldPage({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/heavy_grid_view.dart b/dev/benchmarks/macrobenchmarks/lib/src/heavy_grid_view.dart index 27db044ea3d..22b74846087 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/heavy_grid_view.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/heavy_grid_view.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class HeavyGridViewPage extends StatelessWidget { - const HeavyGridViewPage({Key? key}) : super(key: key); + const HeavyGridViewPage({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/large_image_changer.dart b/dev/benchmarks/macrobenchmarks/lib/src/large_image_changer.dart index ac3536fae3e..e5ecaf40a95 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/large_image_changer.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/large_image_changer.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; /// Displays a new (from image cache's perspective) large image every 500ms. class LargeImageChangerPage extends StatefulWidget { - const LargeImageChangerPage({Key? key}) : super(key: key); + const LargeImageChangerPage({super.key}); @override State createState() => _LargeImageChangerState(); diff --git a/dev/benchmarks/macrobenchmarks/lib/src/large_images.dart b/dev/benchmarks/macrobenchmarks/lib/src/large_images.dart index 5bf34c53869..7ce31b68c3f 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/large_images.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/large_images.dart @@ -7,7 +7,7 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; class LargeImagesPage extends StatelessWidget { - const LargeImagesPage({Key? key}) : super(key: key); + const LargeImagesPage({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/multi_widget_construction.dart b/dev/benchmarks/macrobenchmarks/lib/src/multi_widget_construction.dart index fa242d943b2..054676d1a62 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/multi_widget_construction.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/multi_widget_construction.dart @@ -5,8 +5,7 @@ import 'package:flutter/material.dart'; class MultiWidgetConstructTable extends StatefulWidget { - const MultiWidgetConstructTable(this.columnCount, this.rowCount, {Key? key}) - : super(key: key); + const MultiWidgetConstructTable(this.columnCount, this.rowCount, {super.key}); final int columnCount; final int rowCount; @@ -98,8 +97,7 @@ class _MultiWidgetConstructTableState extends State // This class is intended to break the original Widget tree class MyContainer extends StatelessWidget { - const MyContainer({required this.color, required this.child, required this.constraints, Key? key}) - : super(key: key); + const MyContainer({required this.color, required this.child, required this.constraints, super.key}); final Color color; final Widget child; final BoxConstraints constraints; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart b/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart index 46e50954553..c719ed50a0d 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart @@ -12,7 +12,7 @@ import '../common.dart'; // combinations of children that can apply it themselves. // See https://github.com/flutter/flutter/issues/75697 class OpacityPeepholePage extends StatelessWidget { - const OpacityPeepholePage({Key? key}) : super(key: key); + const OpacityPeepholePage({super.key}); @override Widget build(BuildContext context) { @@ -419,7 +419,7 @@ Map opacityPeepholeRoutes = { }; class VariantPage extends StatefulWidget { - const VariantPage({Key? key, required this.variant}) : super(key: key); + const VariantPage({super.key, required this.variant}); final OpacityPeepholeCase variant; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/picture_cache.dart b/dev/benchmarks/macrobenchmarks/lib/src/picture_cache.dart index 14c814893a7..08063c75af2 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/picture_cache.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/picture_cache.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class PictureCachePage extends StatelessWidget { - const PictureCachePage({Key? key}) : super(key: key); + const PictureCachePage({super.key}); static const List kTabNames = ['1', '2', '3', '4', '5']; @@ -45,8 +45,7 @@ class PictureCachePage extends StatelessWidget { } class ListItem extends StatelessWidget { - const ListItem({Key? key, required this.index}) - : super(key: key); + const ListItem({super.key, required this.index}); final int index; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/picture_cache_complexity_scoring.dart b/dev/benchmarks/macrobenchmarks/lib/src/picture_cache_complexity_scoring.dart index c8ef28fb74d..800010c1166 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/picture_cache_complexity_scoring.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/picture_cache_complexity_scoring.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class PictureCacheComplexityScoringPage extends StatelessWidget { - const PictureCacheComplexityScoringPage({Key? key}) : super(key: key); + const PictureCacheComplexityScoringPage({super.key}); static const List kTabNames = ['1', '2']; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/post_backdrop_filter.dart b/dev/benchmarks/macrobenchmarks/lib/src/post_backdrop_filter.dart index f13736027e2..d95aed858dc 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/post_backdrop_filter.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/post_backdrop_filter.dart @@ -7,7 +7,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; class PostBackdropFilterPage extends StatefulWidget { - const PostBackdropFilterPage({Key? key}) : super(key: key); + const PostBackdropFilterPage({super.key}); @override State createState() => _PostBackdropFilterPageState(); diff --git a/dev/benchmarks/macrobenchmarks/lib/src/shader_mask_cache.dart b/dev/benchmarks/macrobenchmarks/lib/src/shader_mask_cache.dart index 79c8a0f5179..cb8ef3bd7d5 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/shader_mask_cache.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/shader_mask_cache.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'picture_cache.dart'; class ShaderMaskCachePage extends StatefulWidget { - const ShaderMaskCachePage({Key? key}) : super(key: key); + const ShaderMaskCachePage({super.key}); @override State createState() => _ShaderMaskCachePageState(); } diff --git a/dev/benchmarks/macrobenchmarks/lib/src/simple_animation.dart b/dev/benchmarks/macrobenchmarks/lib/src/simple_animation.dart index 221e274fea2..c3892909b17 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/simple_animation.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/simple_animation.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class SimpleAnimationPage extends StatelessWidget { - const SimpleAnimationPage({Key? key}) : super(key: key); + const SimpleAnimationPage({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/simple_scroll.dart b/dev/benchmarks/macrobenchmarks/lib/src/simple_scroll.dart index 41ea4cc215a..92436b2fa06 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/simple_scroll.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/simple_scroll.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class SimpleScroll extends StatelessWidget { - const SimpleScroll({Key? key}) : super(key: key); + const SimpleScroll({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/stack_size.dart b/dev/benchmarks/macrobenchmarks/lib/src/stack_size.dart index 185d28872f0..3f828c0a0f4 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/stack_size.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/stack_size.dart @@ -81,7 +81,7 @@ final GetStackPointerCallback getStackPointer = () { }(); class StackSizePage extends StatelessWidget { - const StackSizePage({Key? key}) : super(key: key); + const StackSizePage({super.key}); @override Widget build(BuildContext context) { @@ -100,7 +100,7 @@ class StackSizePage extends StatelessWidget { } class ParentWidget extends StatelessWidget { - const ParentWidget({Key? key}) : super(key: key); + const ParentWidget({super.key}); @override Widget build(BuildContext context) { @@ -110,7 +110,7 @@ class ParentWidget extends StatelessWidget { } class ChildWidget extends StatelessWidget { - const ChildWidget({required this.parentStackSize, Key? key}) : super(key: key); + const ChildWidget({required this.parentStackSize, super.key}); final int parentStackSize; @override diff --git a/dev/benchmarks/macrobenchmarks/lib/src/text.dart b/dev/benchmarks/macrobenchmarks/lib/src/text.dart index af18cae0db5..721099548db 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/text.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/text.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class TextPage extends StatelessWidget { - const TextPage({Key? key}) : super(key: key); + const TextPage({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_build_image.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_build_image.dart index d2773e6f40a..3a35dc27b40 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_build_image.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_build_image.dart @@ -52,7 +52,7 @@ class BenchBuildImage extends WidgetRecorder { } class _RotatingWidget extends StatefulWidget { - const _RotatingWidget({required this.child, Key? key}) : super(key: key); + const _RotatingWidget({required this.child}); final Widget child; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_card_infinite_scroll.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_card_infinite_scroll.dart index a780bac0bf2..3a0a341bd94 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_card_infinite_scroll.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_card_infinite_scroll.dart @@ -35,7 +35,7 @@ class BenchCardInfiniteScroll extends WidgetRecorder { } class _InfiniteScrollCards extends StatefulWidget { - const _InfiniteScrollCards(this.initialOffset, this.finalOffset, {Key? key}) : super(key: key); + const _InfiniteScrollCards(this.initialOffset, this.finalOffset); final double initialOffset; final double finalOffset; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_link_infinite_scroll.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_link_infinite_scroll.dart index e6ec06ec749..e6572c671fa 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_link_infinite_scroll.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_link_infinite_scroll.dart @@ -36,7 +36,7 @@ class BenchLinkInfiniteScroll extends WidgetRecorder { } class _InfiniteScrollLinks extends StatefulWidget { - const _InfiniteScrollLinks(this.initialOffset, this.finalOffset, {Key? key}) : super(key: key); + const _InfiniteScrollLinks(this.initialOffset, this.finalOffset); final double initialOffset; final double finalOffset; diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_pageview_scroll_linethrough.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_pageview_scroll_linethrough.dart index d517a8ab4bf..ab73fb588eb 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_pageview_scroll_linethrough.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_pageview_scroll_linethrough.dart @@ -26,7 +26,7 @@ class BenchPageViewScrollLineThrough extends WidgetRecorder { } class _MyScrollContainer extends StatefulWidget { - const _MyScrollContainer({Key? key}) : super(key: key); + const _MyScrollContainer(); @override State<_MyScrollContainer> createState() => _MyScrollContainerState(); diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart index 4a25d445264..b06d34aafe2 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart @@ -336,14 +336,13 @@ final List allPalettes = [ class ColorItem extends StatelessWidget { const ColorItem({ - Key? key, + super.key, required this.index, required this.color, this.prefix = '', }) : assert(index != null), assert(color != null), - assert(prefix != null), - super(key: key); + assert(prefix != null); final int index; final Color color; @@ -378,9 +377,9 @@ class ColorItem extends StatelessWidget { class PaletteTabView extends StatelessWidget { const PaletteTabView({ - Key? key, + super.key, required this.colors, - }) : super(key: key); + }); final Palette colors; @@ -431,7 +430,7 @@ class PaletteTabView extends StatelessWidget { } class ColorsDemo extends StatelessWidget { - const ColorsDemo({Key? key}) : super(key: key); + const ColorsDemo({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_wrapbox_scroll.dart b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_wrapbox_scroll.dart index 1b3e3ef12e0..466f709e7ed 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/web/bench_wrapbox_scroll.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/web/bench_wrapbox_scroll.dart @@ -29,7 +29,7 @@ class BenchWrapBoxScroll extends WidgetRecorder { } class MyHomePage extends StatefulWidget { - const MyHomePage({Key? key}) : super(key: key); + const MyHomePage({super.key}); @override State createState() => _MyHomePageState(); @@ -82,7 +82,7 @@ class _MyHomePageState extends State { } class ProductPreview extends StatelessWidget { - const ProductPreview(this.previewIndex, {Key? key}) : super(key: key); + const ProductPreview(this.previewIndex, {super.key}); final int previewIndex; @@ -141,9 +141,9 @@ class ProductPreview extends StatelessWidget { class ProductOption extends StatelessWidget { const ProductOption({ - Key? key, + super.key, required this.optionText, - }) : super(key: key); + }); final String optionText; diff --git a/dev/benchmarks/microbenchmarks/lib/gestures/apps/button_matrix_app.dart b/dev/benchmarks/microbenchmarks/lib/gestures/apps/button_matrix_app.dart index ca947ddb324..5b11727db72 100644 --- a/dev/benchmarks/microbenchmarks/lib/gestures/apps/button_matrix_app.dart +++ b/dev/benchmarks/microbenchmarks/lib/gestures/apps/button_matrix_app.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class ButtonMatrixApp extends StatefulWidget { - const ButtonMatrixApp({Key? key}) : super(key: key); + const ButtonMatrixApp({super.key}); @override ButtonMatrixAppState createState() => ButtonMatrixAppState(); diff --git a/dev/benchmarks/multiple_flutters/module/lib/main.dart b/dev/benchmarks/multiple_flutters/module/lib/main.dart index 2b35ddcec0a..4a583b42dee 100644 --- a/dev/benchmarks/multiple_flutters/module/lib/main.dart +++ b/dev/benchmarks/multiple_flutters/module/lib/main.dart @@ -15,7 +15,7 @@ void topMain() => runApp(const MyApp(Colors.green)); void bottomMain() => runApp(const MyApp(Colors.purple)); class MyApp extends StatelessWidget { - const MyApp(this.color, {Key? key}) : super(key: key); + const MyApp(this.color, {super.key}); final Color color; @@ -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}); final String? title; @override diff --git a/dev/benchmarks/platform_channels_benchmarks/lib/main.dart b/dev/benchmarks/platform_channels_benchmarks/lib/main.dart index 4d16b3baee1..06081bfede6 100644 --- a/dev/benchmarks/platform_channels_benchmarks/lib/main.dart +++ b/dev/benchmarks/platform_channels_benchmarks/lib/main.dart @@ -275,7 +275,7 @@ Future _runTests() async { } class _BenchmarkWidget extends StatefulWidget { - const _BenchmarkWidget(this.tests, {Key? key}) : super(key: key); + const _BenchmarkWidget(this.tests); final Future Function() tests; diff --git a/dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings_en.dart b/dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings_en.dart index 04d5bd8b0eb..51e98b40022 100644 --- a/dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings_en.dart +++ b/dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings_en.dart @@ -10,7 +10,7 @@ import 'stock_strings.dart'; /// The translations for English (`en`). class StockStringsEn extends StockStrings { - StockStringsEn([String locale = 'en']) : super(locale); + StockStringsEn([super.locale = 'en']); @override String get title => 'Stocks'; diff --git a/dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings_es.dart b/dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings_es.dart index da1db9a2504..675a57e205d 100644 --- a/dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings_es.dart +++ b/dev/benchmarks/test_apps/stocks/lib/i18n/stock_strings_es.dart @@ -10,7 +10,7 @@ import 'stock_strings.dart'; /// The translations for Spanish Castilian (`es`). class StockStringsEs extends StockStrings { - StockStringsEs([String locale = 'es']) : super(locale); + StockStringsEs([super.locale = 'es']); @override String get title => 'Acciones'; diff --git a/dev/benchmarks/test_apps/stocks/lib/main.dart b/dev/benchmarks/test_apps/stocks/lib/main.dart index c29c9bc684a..e2334f76302 100644 --- a/dev/benchmarks/test_apps/stocks/lib/main.dart +++ b/dev/benchmarks/test_apps/stocks/lib/main.dart @@ -20,7 +20,7 @@ import 'stock_symbol_viewer.dart'; import 'stock_types.dart'; class StocksApp extends StatefulWidget { - const StocksApp({Key? key}) : super(key: key); + const StocksApp({super.key}); @override StocksAppState createState() => StocksAppState(); diff --git a/dev/benchmarks/test_apps/stocks/lib/stock_arrow.dart b/dev/benchmarks/test_apps/stocks/lib/stock_arrow.dart index 9e2af637d50..5419a90911f 100644 --- a/dev/benchmarks/test_apps/stocks/lib/stock_arrow.dart +++ b/dev/benchmarks/test_apps/stocks/lib/stock_arrow.dart @@ -56,7 +56,7 @@ class StockArrowPainter extends CustomPainter { } class StockArrow extends StatelessWidget { - const StockArrow({ Key? key, required this.percentChange }) : super(key: key); + const StockArrow({ super.key, required this.percentChange }); final double percentChange; diff --git a/dev/benchmarks/test_apps/stocks/lib/stock_home.dart b/dev/benchmarks/test_apps/stocks/lib/stock_home.dart index 670f58d9fa4..6397dd5a168 100644 --- a/dev/benchmarks/test_apps/stocks/lib/stock_home.dart +++ b/dev/benchmarks/test_apps/stocks/lib/stock_home.dart @@ -52,7 +52,7 @@ class _NotImplementedDialog extends StatelessWidget { } class StockHome extends StatefulWidget { - const StockHome(this.stocks, this.configuration, this.updater, {Key? key}) : super(key: key); + const StockHome(this.stocks, this.configuration, this.updater, {super.key}); final StockData stocks; final StockConfiguration configuration; diff --git a/dev/benchmarks/test_apps/stocks/lib/stock_list.dart b/dev/benchmarks/test_apps/stocks/lib/stock_list.dart index eacb383f36e..903378d26fc 100644 --- a/dev/benchmarks/test_apps/stocks/lib/stock_list.dart +++ b/dev/benchmarks/test_apps/stocks/lib/stock_list.dart @@ -9,12 +9,12 @@ import 'stock_row.dart'; class StockList extends StatelessWidget { const StockList({ - Key? key, + super.key, required this.stocks, required this.onOpen, required this.onShow, required this.onAction, - }) : super(key: key); + }); final List stocks; final StockRowActionCallback onOpen; diff --git a/dev/benchmarks/test_apps/stocks/lib/stock_settings.dart b/dev/benchmarks/test_apps/stocks/lib/stock_settings.dart index e6363fe1e39..1bfc22dfb1a 100644 --- a/dev/benchmarks/test_apps/stocks/lib/stock_settings.dart +++ b/dev/benchmarks/test_apps/stocks/lib/stock_settings.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; import 'stock_types.dart'; class StockSettings extends StatefulWidget { - const StockSettings(this.configuration, this.updater, {Key? key}) : super(key: key); + const StockSettings(this.configuration, this.updater, {super.key}); final StockConfiguration configuration; final ValueChanged updater; diff --git a/dev/benchmarks/test_apps/stocks/lib/stock_symbol_viewer.dart b/dev/benchmarks/test_apps/stocks/lib/stock_symbol_viewer.dart index ac7ecc97957..77be8275c4b 100644 --- a/dev/benchmarks/test_apps/stocks/lib/stock_symbol_viewer.dart +++ b/dev/benchmarks/test_apps/stocks/lib/stock_symbol_viewer.dart @@ -69,10 +69,10 @@ class _StockSymbolView extends StatelessWidget { class StockSymbolPage extends StatelessWidget { const StockSymbolPage({ - Key? key, + super.key, required this.symbol, required this.stocks, - }) : super(key: key); + }); final String symbol; final StockData stocks; @@ -121,9 +121,9 @@ class StockSymbolPage extends StatelessWidget { class StockSymbolBottomSheet extends StatelessWidget { const StockSymbolBottomSheet({ - Key? key, + super.key, required this.stock, - }) : super(key: key); + }); final Stock stock; diff --git a/dev/conductor/core/lib/src/next.dart b/dev/conductor/core/lib/src/next.dart index d3b0a5db93f..b6756b2dc3c 100644 --- a/dev/conductor/core/lib/src/next.dart +++ b/dev/conductor/core/lib/src/next.dart @@ -74,12 +74,9 @@ class NextContext extends Context { const NextContext({ required this.autoAccept, required this.force, - required Checkouts checkouts, - required File stateFile, - }) : super( - checkouts: checkouts, - stateFile: stateFile, - ); + required super.checkouts, + required super.stateFile, + }); final bool autoAccept; final bool force; diff --git a/dev/conductor/core/lib/src/repository.dart b/dev/conductor/core/lib/src/repository.dart index 7a86c528e39..12854bfabce 100644 --- a/dev/conductor/core/lib/src/repository.dart +++ b/dev/conductor/core/lib/src/repository.dart @@ -467,26 +467,20 @@ abstract class Repository { class FrameworkRepository extends Repository { FrameworkRepository( this.checkouts, { - String name = 'framework', - Remote upstreamRemote = const Remote( + super.name = 'framework', + super.upstreamRemote = const Remote( name: RemoteName.upstream, url: FrameworkRepository.defaultUpstream), - bool localUpstream = false, - String? previousCheckoutLocation, - String initialRef = FrameworkRepository.defaultBranch, - Remote? mirrorRemote, + super.localUpstream, + super.previousCheckoutLocation, + String super.initialRef = FrameworkRepository.defaultBranch, + super.mirrorRemote, List? additionalRequiredLocalBranches, }) : super( - name: name, - upstreamRemote: upstreamRemote, - mirrorRemote: mirrorRemote, - initialRef: initialRef, fileSystem: checkouts.fileSystem, - localUpstream: localUpstream, parentDirectory: checkouts.directory, platform: checkouts.platform, processManager: checkouts.processManager, stdio: checkouts.stdio, - previousCheckoutLocation: previousCheckoutLocation, requiredLocalBranches: [ ...?additionalRequiredLocalBranches, ...kReleaseChannels, @@ -757,26 +751,20 @@ class HostFrameworkRepository extends FrameworkRepository { class EngineRepository extends Repository { EngineRepository( this.checkouts, { - String name = 'engine', - String initialRef = EngineRepository.defaultBranch, - Remote upstreamRemote = const Remote( + super.name = 'engine', + String super.initialRef = EngineRepository.defaultBranch, + super.upstreamRemote = const Remote( name: RemoteName.upstream, url: EngineRepository.defaultUpstream), - bool localUpstream = false, - String? previousCheckoutLocation, - Remote? mirrorRemote, + super.localUpstream, + super.previousCheckoutLocation, + super.mirrorRemote, List? additionalRequiredLocalBranches, }) : super( - name: name, - upstreamRemote: upstreamRemote, - mirrorRemote: mirrorRemote, - initialRef: initialRef, fileSystem: checkouts.fileSystem, - localUpstream: localUpstream, parentDirectory: checkouts.directory, platform: checkouts.platform, processManager: checkouts.processManager, stdio: checkouts.stdio, - previousCheckoutLocation: previousCheckoutLocation, requiredLocalBranches: additionalRequiredLocalBranches ?? const [], ); diff --git a/dev/conductor/core/lib/src/start.dart b/dev/conductor/core/lib/src/start.dart index 97b13c3967a..ebafaf2533f 100644 --- a/dev/conductor/core/lib/src/start.dart +++ b/dev/conductor/core/lib/src/start.dart @@ -227,8 +227,8 @@ class StartContext extends Context { required this.conductorVersion, required this.processManager, required this.releaseChannel, - required Checkouts checkouts, - required File stateFile, + required super.checkouts, + required super.stateFile, this.force = false, this.versionOverride, }) : git = Git(processManager), @@ -254,10 +254,6 @@ class StartContext extends Context { name: RemoteName.mirror, url: frameworkMirror, ), - ), - super( - checkouts: checkouts, - stateFile: stateFile, ); final String candidateBranch; diff --git a/dev/conductor/core/test/codesign_test.dart b/dev/conductor/core/test/codesign_test.dart index b51625f1766..2bbf122b024 100644 --- a/dev/conductor/core/test/codesign_test.dart +++ b/dev/conductor/core/test/codesign_test.dart @@ -5,7 +5,6 @@ import 'package:args/command_runner.dart'; import 'package:conductor_core/src/codesign.dart'; import 'package:conductor_core/src/repository.dart'; -import 'package:file/file.dart'; import 'package:file/memory.dart'; import 'package:platform/platform.dart'; @@ -512,11 +511,11 @@ void main() { class FakeCodesignCommand extends CodesignCommand { FakeCodesignCommand({ - required Checkouts checkouts, + required super.checkouts, required this.binariesWithEntitlements, required this.binariesWithoutEntitlements, - required Directory flutterRoot, - }) : super(checkouts: checkouts, flutterRoot: flutterRoot); + required super.flutterRoot, + }); @override final Future> binariesWithEntitlements; diff --git a/dev/conductor/core/test/next_test.dart b/dev/conductor/core/test/next_test.dart index 26c8eb38f44..b4b8db10eeb 100644 --- a/dev/conductor/core/test/next_test.dart +++ b/dev/conductor/core/test/next_test.dart @@ -1196,16 +1196,9 @@ class _TestRepository extends Repository { class _TestNextContext extends NextContext { const _TestNextContext({ - bool autoAccept = false, - bool force = false, - required File stateFile, - required Checkouts checkouts, - }) : super( - autoAccept: autoAccept, - force: force, - checkouts: checkouts, - stateFile: stateFile, - ); + required super.stateFile, + required super.checkouts, + }) : super(autoAccept: false, force: false); @override Future prompt(String message) { diff --git a/dev/customer_testing/pubspec.yaml b/dev/customer_testing/pubspec.yaml index 41bbbe6e059..2ff89e30c87 100644 --- a/dev/customer_testing/pubspec.yaml +++ b/dev/customer_testing/pubspec.yaml @@ -2,7 +2,7 @@ name: customer_testing description: Tool to run the tests listed in the flutter/tests repository. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.17.0-0 <3.0.0' dependencies: args: 2.3.0 diff --git a/dev/forbidden_from_release_tests/pubspec.yaml b/dev/forbidden_from_release_tests/pubspec.yaml index 82942fc0497..00e92b0ce2b 100644 --- a/dev/forbidden_from_release_tests/pubspec.yaml +++ b/dev/forbidden_from_release_tests/pubspec.yaml @@ -2,7 +2,7 @@ name: forbidden_from_release_tests publish_to: 'none' environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.17.0-0 <3.0.0' dependencies: args: 2.3.0 diff --git a/dev/integration_tests/abstract_method_smoke_test/lib/main.dart b/dev/integration_tests/abstract_method_smoke_test/lib/main.dart index 805e291b79d..0b67152b173 100644 --- a/dev/integration_tests/abstract_method_smoke_test/lib/main.dart +++ b/dev/integration_tests/abstract_method_smoke_test/lib/main.dart @@ -14,7 +14,7 @@ Future 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 createState() => _HomePage(); @@ -55,7 +55,7 @@ class _HomePage extends State { } class SecondPage extends StatelessWidget { - const SecondPage({Key? key}) : super(key: key); + const SecondPage({super.key}); @override Widget build(BuildContext context) { diff --git a/dev/integration_tests/android_views/lib/main.dart b/dev/integration_tests/android_views/lib/main.dart index af01c6fc2c9..fc7cb2ffec9 100644 --- a/dev/integration_tests/android_views/lib/main.dart +++ b/dev/integration_tests/android_views/lib/main.dart @@ -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) { diff --git a/dev/integration_tests/android_views/lib/motion_events_page.dart b/dev/integration_tests/android_views/lib/motion_events_page.dart index 252eeaacf64..d2b1d7f39a7 100644 --- a/dev/integration_tests/android_views/lib/motion_events_page.dart +++ b/dev/integration_tests/android_views/lib/motion_events_page.dart @@ -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 { } 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 originalEvent; final Map synthesizedEvent; diff --git a/dev/integration_tests/android_views/lib/page.dart b/dev/integration_tests/android_views/lib/page.dart index dbcd8fa59e4..1cef0519881 100644 --- a/dev/integration_tests/android_views/lib/page.dart +++ b/dev/integration_tests/android_views/lib/page.dart @@ -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 /// diff --git a/dev/integration_tests/android_views/lib/wm_integrations.dart b/dev/integration_tests/android_views/lib/wm_integrations.dart index 7856e15a742..96371a84916 100644 --- a/dev/integration_tests/android_views/lib/wm_integrations.dart +++ b/dev/integration_tests/android_views/lib/wm_integrations.dart @@ -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 createState() => WindowManagerBodyState(); diff --git a/dev/integration_tests/android_views/pubspec.yaml b/dev/integration_tests/android_views/pubspec.yaml index 94ef8076450..bab3f2260e2 100644 --- a/dev/integration_tests/android_views/pubspec.yaml +++ b/dev/integration_tests/android_views/pubspec.yaml @@ -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: diff --git a/dev/integration_tests/channels/lib/main.dart b/dev/integration_tests/channels/lib/main.dart index fa8160cb544..cccfdf2e390 100644 --- a/dev/integration_tests/channels/lib/main.dart +++ b/dev/integration_tests/channels/lib/main.dart @@ -19,7 +19,7 @@ void main() { } class TestApp extends StatefulWidget { - const TestApp({Key? key}) : super(key: key); + const TestApp({super.key}); @override State createState() => _TestAppState(); diff --git a/dev/integration_tests/deferred_components_test/lib/component1.dart b/dev/integration_tests/deferred_components_test/lib/component1.dart index aeca0a68389..3b2101510c2 100644 --- a/dev/integration_tests/deferred_components_test/lib/component1.dart +++ b/dev/integration_tests/deferred_components_test/lib/component1.dart @@ -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'; diff --git a/dev/integration_tests/deferred_components_test/lib/main.dart b/dev/integration_tests/deferred_components_test/lib/main.dart index 152363f66a0..5495b052eb1 100644 --- a/dev/integration_tests/deferred_components_test/lib/main.dart +++ b/dev/integration_tests/deferred_components_test/lib/main.dart @@ -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(); diff --git a/dev/integration_tests/deferred_components_test/pubspec.yaml b/dev/integration_tests/deferred_components_test/pubspec.yaml index 374b0b31336..5dc90f50a96 100644 --- a/dev/integration_tests/deferred_components_test/pubspec.yaml +++ b/dev/integration_tests/deferred_components_test/pubspec.yaml @@ -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: diff --git a/dev/integration_tests/external_ui/lib/main.dart b/dev/integration_tests/external_ui/lib/main.dart index 3e4f7661efc..8d133ddb722 100644 --- a/dev/integration_tests/external_ui/lib/main.dart +++ b/dev/integration_tests/external_ui/lib/main.dart @@ -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(); diff --git a/dev/integration_tests/flavors/lib/main.dart b/dev/integration_tests/flavors/lib/main.dart index a618efcdfd8..6ca7d69f1a6 100644 --- a/dev/integration_tests/flavors/lib/main.dart +++ b/dev/integration_tests/flavors/lib/main.dart @@ -16,7 +16,7 @@ void runMainApp() { } class Flavor extends StatefulWidget { - const Flavor({Key? key}) : super(key: key); + const Flavor({super.key}); @override State createState() => _FlavorState(); diff --git a/dev/integration_tests/hybrid_android_views/lib/android_platform_view.dart b/dev/integration_tests/hybrid_android_views/lib/android_platform_view.dart index 40630d43339..07ec8302c57 100644 --- a/dev/integration_tests/hybrid_android_views/lib/android_platform_view.dart +++ b/dev/integration_tests/hybrid_android_views/lib/android_platform_view.dart @@ -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. /// diff --git a/dev/integration_tests/hybrid_android_views/lib/main.dart b/dev/integration_tests/hybrid_android_views/lib/main.dart index 936de3f66ff..2009c8e97f9 100644 --- a/dev/integration_tests/hybrid_android_views/lib/main.dart +++ b/dev/integration_tests/hybrid_android_views/lib/main.dart @@ -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) { diff --git a/dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart b/dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart index e64af563a0b..7389c77b5f3 100644 --- a/dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart +++ b/dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart @@ -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 { } 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 originalEvent; final Map synthesizedEvent; diff --git a/dev/integration_tests/hybrid_android_views/lib/nested_view_event_page.dart b/dev/integration_tests/hybrid_android_views/lib/nested_view_event_page.dart index b298b0a1c74..c60f9b39c21 100644 --- a/dev/integration_tests/hybrid_android_views/lib/nested_view_event_page.dart +++ b/dev/integration_tests/hybrid_android_views/lib/nested_view_event_page.dart @@ -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 createState() => NestedViewEventBodyState(); diff --git a/dev/integration_tests/hybrid_android_views/lib/page.dart b/dev/integration_tests/hybrid_android_views/lib/page.dart index dbcd8fa59e4..1cef0519881 100644 --- a/dev/integration_tests/hybrid_android_views/lib/page.dart +++ b/dev/integration_tests/hybrid_android_views/lib/page.dart @@ -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 /// diff --git a/dev/integration_tests/hybrid_android_views/pubspec.yaml b/dev/integration_tests/hybrid_android_views/pubspec.yaml index a8289622e33..0121988f1e0 100644 --- a/dev/integration_tests/hybrid_android_views/pubspec.yaml +++ b/dev/integration_tests/hybrid_android_views/pubspec.yaml @@ -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: diff --git a/dev/integration_tests/ios_add2app_life_cycle/flutterapp/lib/main.dart b/dev/integration_tests/ios_add2app_life_cycle/flutterapp/lib/main.dart index 98e8233254c..09eb38291ba 100644 --- a/dev/integration_tests/ios_add2app_life_cycle/flutterapp/lib/main.dart +++ b/dev/integration_tests/ios_add2app_life_cycle/flutterapp/lib/main.dart @@ -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 createState() => _LifeCycleSpyState(); diff --git a/dev/integration_tests/ios_app_with_extensions/lib/main.dart b/dev/integration_tests/ios_app_with_extensions/lib/main.dart index 7ef18f2d30a..0936e3b159d 100644 --- a/dev/integration_tests/ios_app_with_extensions/lib/main.dart +++ b/dev/integration_tests/ios_app_with_extensions/lib/main.dart @@ -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 diff --git a/dev/integration_tests/ios_platform_view_tests/lib/main.dart b/dev/integration_tests/ios_platform_view_tests/lib/main.dart index 55ceca0c68f..aeb4f44f318 100644 --- a/dev/integration_tests/ios_platform_view_tests/lib/main.dart +++ b/dev/integration_tests/ios_platform_view_tests/lib/main.dart @@ -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 { /// 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('plus_button'); diff --git a/dev/integration_tests/platform_interaction/lib/main.dart b/dev/integration_tests/platform_interaction/lib/main.dart index 4277bece0ad..b5deae2dada 100644 --- a/dev/integration_tests/platform_interaction/lib/main.dart +++ b/dev/integration_tests/platform_interaction/lib/main.dart @@ -16,7 +16,7 @@ void main() { } class TestApp extends StatefulWidget { - const TestApp({Key? key}) : super(key: key); + const TestApp({super.key}); @override State createState() => _TestAppState(); diff --git a/dev/integration_tests/ui/lib/commands.dart b/dev/integration_tests/ui/lib/commands.dart index e665a09ddf1..120475a33fa 100644 --- a/dev/integration_tests/ui/lib/commands.dart +++ b/dev/integration_tests/ui/lib/commands.dart @@ -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(); diff --git a/dev/integration_tests/ui/lib/driver.dart b/dev/integration_tests/ui/lib/driver.dart index 95246567db4..1df99113b2a 100644 --- a/dev/integration_tests/ui/lib/driver.dart +++ b/dev/integration_tests/ui/lib/driver.dart @@ -11,7 +11,7 @@ void main() { } class DriverTestApp extends StatefulWidget { - const DriverTestApp({Key? key}) : super(key: key); + const DriverTestApp({super.key}); @override State createState() { diff --git a/dev/integration_tests/ui/lib/empty.dart b/dev/integration_tests/ui/lib/empty.dart index a02785c9149..e8f58cf3f71 100644 --- a/dev/integration_tests/ui/lib/empty.dart +++ b/dev/integration_tests/ui/lib/empty.dart @@ -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(); diff --git a/dev/integration_tests/ui/lib/frame_number.dart b/dev/integration_tests/ui/lib/frame_number.dart index 1ed019e075d..b4f1d02ca59 100644 --- a/dev/integration_tests/ui/lib/frame_number.dart +++ b/dev/integration_tests/ui/lib/frame_number.dart @@ -26,9 +26,8 @@ void main() { class _FirstFrameTimings extends StatefulWidget { const _FirstFrameTimings({ - Key? key, required this.completer, - }) : super(key: key); + }); final Completer> completer; diff --git a/dev/integration_tests/ui/lib/keyboard_resize.dart b/dev/integration_tests/ui/lib/keyboard_resize.dart index 5031665deae..d880c210d1a 100644 --- a/dev/integration_tests/ui/lib/keyboard_resize.dart +++ b/dev/integration_tests/ui/lib/keyboard_resize.dart @@ -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 createState() => _MyHomePageState(); diff --git a/dev/integration_tests/ui/lib/keyboard_textfield.dart b/dev/integration_tests/ui/lib/keyboard_textfield.dart index 1b83cbaca14..4917657c603 100644 --- a/dev/integration_tests/ui/lib/keyboard_textfield.dart +++ b/dev/integration_tests/ui/lib/keyboard_textfield.dart @@ -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 createState() => _MyHomePageState(); diff --git a/dev/integration_tests/ui/lib/license_check.dart b/dev/integration_tests/ui/lib/license_check.dart index 2667a4baec2..12a7789a5e2 100644 --- a/dev/integration_tests/ui/lib/license_check.dart +++ b/dev/integration_tests/ui/lib/license_check.dart @@ -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, diff --git a/dev/integration_tests/ui/lib/overflow.dart b/dev/integration_tests/ui/lib/overflow.dart index d030e28751a..ffea335d915 100644 --- a/dev/integration_tests/ui/lib/overflow.dart +++ b/dev/integration_tests/ui/lib/overflow.dart @@ -9,7 +9,7 @@ void main() { } class Test extends StatefulWidget { - const Test({ Key? key }) : super(key: key); + const Test({ super.key }); @override State createState() => _TestState(); diff --git a/dev/integration_tests/ui/lib/screenshot.dart b/dev/integration_tests/ui/lib/screenshot.dart index f58dad5604a..d00d4c17dc4 100644 --- a/dev/integration_tests/ui/lib/screenshot.dart +++ b/dev/integration_tests/ui/lib/screenshot.dart @@ -16,7 +16,7 @@ void main() { } class Toggler extends StatefulWidget { - const Toggler({Key? key}) : super(key: key); + const Toggler({super.key}); @override State createState() => TogglerState(); diff --git a/dev/integration_tests/web/lib/framework_stack_trace.dart b/dev/integration_tests/web/lib/framework_stack_trace.dart index 7028b6ed484..bf49c6bc221 100644 --- a/dev/integration_tests/web/lib/framework_stack_trace.dart +++ b/dev/integration_tests/web/lib/framework_stack_trace.dart @@ -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 createState() => _ThrowingWidgetState(); diff --git a/dev/integration_tests/web_compile_tests/pubspec.yaml b/dev/integration_tests/web_compile_tests/pubspec.yaml index ecb0016574d..62eee6fab28 100644 --- a/dev/integration_tests/web_compile_tests/pubspec.yaml +++ b/dev/integration_tests/web_compile_tests/pubspec.yaml @@ -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: diff --git a/dev/integration_tests/web_e2e_tests/lib/image_loading_main.dart b/dev/integration_tests/web_e2e_tests/lib/image_loading_main.dart index a0cced1a3e4..81a35d216c4 100644 --- a/dev/integration_tests/web_e2e_tests/lib/image_loading_main.dart +++ b/dev/integration_tests/web_e2e_tests/lib/image_loading_main.dart @@ -27,7 +27,7 @@ Future main() async { } class MyApp extends StatefulWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override MyAppState createState() => MyAppState(); diff --git a/dev/integration_tests/web_e2e_tests/lib/platform_messages_main.dart b/dev/integration_tests/web_e2e_tests/lib/platform_messages_main.dart index 128f66077ed..8f7dde57afa 100644 --- a/dev/integration_tests/web_e2e_tests/lib/platform_messages_main.dart +++ b/dev/integration_tests/web_e2e_tests/lib/platform_messages_main.dart @@ -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; diff --git a/dev/integration_tests/web_e2e_tests/lib/profile_diagnostics_main.dart b/dev/integration_tests/web_e2e_tests/lib/profile_diagnostics_main.dart index 832a135a33a..d914ee1acd3 100644 --- a/dev/integration_tests/web_e2e_tests/lib/profile_diagnostics_main.dart +++ b/dev/integration_tests/web_e2e_tests/lib/profile_diagnostics_main.dart @@ -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(); diff --git a/dev/integration_tests/web_e2e_tests/lib/scroll_wheel_main.dart b/dev/integration_tests/web_e2e_tests/lib/scroll_wheel_main.dart index cd763893691..8216640fe24 100644 --- a/dev/integration_tests/web_e2e_tests/lib/scroll_wheel_main.dart +++ b/dev/integration_tests/web_e2e_tests/lib/scroll_wheel_main.dart @@ -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; diff --git a/dev/integration_tests/web_e2e_tests/lib/target_platform_main.dart b/dev/integration_tests/web_e2e_tests/lib/target_platform_main.dart index 386a3f132dd..afb63c17751 100644 --- a/dev/integration_tests/web_e2e_tests/lib/target_platform_main.dart +++ b/dev/integration_tests/web_e2e_tests/lib/target_platform_main.dart @@ -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) { diff --git a/dev/integration_tests/web_e2e_tests/lib/text_editing_main.dart b/dev/integration_tests/web_e2e_tests/lib/text_editing_main.dart index 5f6b01f06b7..8358b743c00 100644 --- a/dev/integration_tests/web_e2e_tests/lib/text_editing_main.dart +++ b/dev/integration_tests/web_e2e_tests/lib/text_editing_main.dart @@ -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; diff --git a/dev/integration_tests/web_e2e_tests/lib/treeshaking_main.dart b/dev/integration_tests/web_e2e_tests/lib/treeshaking_main.dart index d9a79b82777..b52c675e5c9 100644 --- a/dev/integration_tests/web_e2e_tests/lib/treeshaking_main.dart +++ b/dev/integration_tests/web_e2e_tests/lib/treeshaking_main.dart @@ -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; diff --git a/dev/integration_tests/web_e2e_tests/lib/url_strategy_main.dart b/dev/integration_tests/web_e2e_tests/lib/url_strategy_main.dart index 70d0d7c5e95..f4a34fcecbc 100644 --- a/dev/integration_tests/web_e2e_tests/lib/url_strategy_main.dart +++ b/dev/integration_tests/web_e2e_tests/lib/url_strategy_main.dart @@ -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 routes; diff --git a/dev/manual_tests/lib/actions.dart b/dev/manual_tests/lib/actions.dart index 1f83b8d15e4..50e3c308167 100644 --- a/dev/manual_tests/lib/actions.dart +++ b/dev/manual_tests/lib/actions.dart @@ -310,7 +310,7 @@ class UndoableDirectionalFocusAction extends UndoableFocusActionBase { } class FocusDemo extends StatefulWidget { - const FocusDemo({Key? key}) : super(key: key); + const FocusDemo({super.key}); static GlobalKey appKey = GlobalKey(); diff --git a/dev/manual_tests/lib/animated_icons.dart b/dev/manual_tests/lib/animated_icons.dart index 2ff0e030540..daa3f572c00 100644 --- a/dev/manual_tests/lib/animated_icons.dart +++ b/dev/manual_tests/lib/animated_icons.dart @@ -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; diff --git a/dev/manual_tests/lib/card_collection.dart b/dev/manual_tests/lib/card_collection.dart index b397af3a31e..0f4afe19691 100644 --- a/dev/manual_tests/lib/card_collection.dart +++ b/dev/manual_tests/lib/card_collection.dart @@ -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(); diff --git a/dev/manual_tests/lib/color_testing_demo.dart b/dev/manual_tests/lib/color_testing_demo.dart index cbcd49fedb2..267b5f4a19f 100644 --- a/dev/manual_tests/lib/color_testing_demo.dart +++ b/dev/manual_tests/lib/color_testing_demo.dart @@ -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; diff --git a/dev/manual_tests/lib/density.dart b/dev/manual_tests/lib/density.dart index 92611f4effb..c4307b80e59 100644 --- a/dev/manual_tests/lib/density.dart +++ b/dev/manual_tests/lib/density.dart @@ -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? 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 { } 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; diff --git a/dev/manual_tests/lib/drag_and_drop.dart b/dev/manual_tests/lib/drag_and_drop.dart index 944a7464495..f0d9ce1f27d 100644 --- a/dev/manual_tests/lib/drag_and_drop.dart +++ b/dev/manual_tests/lib/drag_and_drop.dart @@ -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 { } 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 { 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(); diff --git a/dev/manual_tests/lib/focus.dart b/dev/manual_tests/lib/focus.dart index 34b08ebc0d0..a248b10d592 100644 --- a/dev/manual_tests/lib/focus.dart +++ b/dev/manual_tests/lib/focus.dart @@ -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 { } class FocusDemo extends StatefulWidget { - const FocusDemo({Key? key}) : super(key: key); + const FocusDemo({super.key}); @override State createState() => _FocusDemoState(); diff --git a/dev/manual_tests/lib/hover.dart b/dev/manual_tests/lib/hover.dart index ec15311a11d..e062e4dfc15 100644 --- a/dev/manual_tests/lib/hover.dart +++ b/dev/manual_tests/lib/hover.dart @@ -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 createState() => _HoverDemoState(); diff --git a/dev/manual_tests/lib/material_arc.dart b/dev/manual_tests/lib/material_arc.dart index 571a5b61513..dba072f609f 100644 --- a/dev/manual_tests/lib/material_arc.dart +++ b/dev/manual_tests/lib/material_arc.dart @@ -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 createState() => _AnimationDemoState(); diff --git a/dev/manual_tests/lib/overlay_geometry.dart b/dev/manual_tests/lib/overlay_geometry.dart index c224eb273be..c60ab37ce3c 100644 --- a/dev/manual_tests/lib/overlay_geometry.dart +++ b/dev/manual_tests/lib/overlay_geometry.dart @@ -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(); diff --git a/dev/manual_tests/lib/page_view.dart b/dev/manual_tests/lib/page_view.dart index 86ff201fcd4..25b9a79d4cc 100644 --- a/dev/manual_tests/lib/page_view.dart +++ b/dev/manual_tests/lib/page_view.dart @@ -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(); diff --git a/dev/manual_tests/lib/raw_keyboard.dart b/dev/manual_tests/lib/raw_keyboard.dart index eba88f80255..52c94dab91c 100644 --- a/dev/manual_tests/lib/raw_keyboard.dart +++ b/dev/manual_tests/lib/raw_keyboard.dart @@ -20,7 +20,7 @@ void main() { } class RawKeyboardDemo extends StatefulWidget { - const RawKeyboardDemo({Key? key}) : super(key: key); + const RawKeyboardDemo({super.key}); @override State createState() => _HardwareKeyDemoState(); diff --git a/dev/manual_tests/lib/text.dart b/dev/manual_tests/lib/text.dart index 2323f266bce..b6a00d89e06 100644 --- a/dev/manual_tests/lib/text.dart +++ b/dev/manual_tests/lib/text.dart @@ -26,7 +26,7 @@ void main() { } class Home extends StatefulWidget { - const Home({ Key? key }) : super(key: key); + const Home({ super.key }); @override State createState() => _HomeState(); @@ -118,7 +118,7 @@ class _HomeState extends State { } 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 with SingleTickerProviderStateMixin { } class Underlines extends StatefulWidget { - const Underlines({ Key? key }) : super(key: key); + const Underlines({ super.key }); @override State createState() => _UnderlinesState(); @@ -639,7 +639,7 @@ class _UnderlinesState extends State { } class Fallback extends StatefulWidget { - const Fallback({ Key? key }) : super(key: key); + const Fallback({ super.key }); @override State createState() => _FallbackState(); @@ -734,7 +734,7 @@ class _FallbackState extends State { } class Bidi extends StatefulWidget { - const Bidi({ Key? key }) : super(key: key); + const Bidi({ super.key }); @override State createState() => _BidiState(); @@ -809,7 +809,7 @@ class _BidiState extends State { } 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 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; diff --git a/dev/tools/gen_defaults/lib/card_template.dart b/dev/tools/gen_defaults/lib/card_template.dart index b34b5517cf1..db1994377a9 100644 --- a/dev/tools/gen_defaults/lib/card_template.dart +++ b/dev/tools/gen_defaults/lib/card_template.dart @@ -5,7 +5,7 @@ import 'template.dart'; class CardTemplate extends TokenTemplate { - const CardTemplate(String fileName, Map tokens) : super(fileName, tokens); + const CardTemplate(super.fileName, super.tokens); @override String generate() => ''' diff --git a/dev/tools/gen_defaults/lib/dialog_template.dart b/dev/tools/gen_defaults/lib/dialog_template.dart index acb67cf5fe2..b4856b18171 100644 --- a/dev/tools/gen_defaults/lib/dialog_template.dart +++ b/dev/tools/gen_defaults/lib/dialog_template.dart @@ -5,9 +5,8 @@ import 'template.dart'; class DialogTemplate extends TokenTemplate { - const DialogTemplate(String fileName, Map tokens) - : super(fileName, tokens, - colorSchemePrefix: '_colors.', + const DialogTemplate(super.fileName, super.tokens) + : super(colorSchemePrefix: '_colors.', textThemePrefix: '_textTheme.' ); diff --git a/dev/tools/gen_defaults/lib/fab_template.dart b/dev/tools/gen_defaults/lib/fab_template.dart index fea34dbab79..91bd458e761 100644 --- a/dev/tools/gen_defaults/lib/fab_template.dart +++ b/dev/tools/gen_defaults/lib/fab_template.dart @@ -5,9 +5,8 @@ import 'template.dart'; class FABTemplate extends TokenTemplate { - const FABTemplate(String fileName, Map tokens) - : super(fileName, tokens, - colorSchemePrefix: '_colors.', + const FABTemplate(super.fileName, super.tokens) + : super(colorSchemePrefix: '_colors.', textThemePrefix: '_textTheme.', ); diff --git a/dev/tools/gen_defaults/lib/navigation_bar_template.dart b/dev/tools/gen_defaults/lib/navigation_bar_template.dart index 2f9b3e8f9e6..2dc120388c6 100644 --- a/dev/tools/gen_defaults/lib/navigation_bar_template.dart +++ b/dev/tools/gen_defaults/lib/navigation_bar_template.dart @@ -5,9 +5,8 @@ import 'template.dart'; class NavigationBarTemplate extends TokenTemplate { - const NavigationBarTemplate(String fileName, Map tokens) - : super(fileName, tokens, - colorSchemePrefix: '_colors.', + const NavigationBarTemplate(super.fileName, super.tokens) + : super(colorSchemePrefix: '_colors.', textThemePrefix: '_textTheme.', ); diff --git a/dev/tools/gen_defaults/lib/navigation_rail_template.dart b/dev/tools/gen_defaults/lib/navigation_rail_template.dart index d2ccc3ff287..25701856ce6 100644 --- a/dev/tools/gen_defaults/lib/navigation_rail_template.dart +++ b/dev/tools/gen_defaults/lib/navigation_rail_template.dart @@ -5,9 +5,8 @@ import 'template.dart'; class NavigationRailTemplate extends TokenTemplate { - const NavigationRailTemplate(String fileName, Map tokens) - : super(fileName, tokens, - colorSchemePrefix: '_colors.', + const NavigationRailTemplate(super.fileName, super.tokens) + : super(colorSchemePrefix: '_colors.', textThemePrefix: '_textTheme.', ); diff --git a/dev/tools/pubspec.yaml b/dev/tools/pubspec.yaml index 3b791abf94b..ade4ffa31f8 100644 --- a/dev/tools/pubspec.yaml +++ b/dev/tools/pubspec.yaml @@ -2,7 +2,7 @@ name: dev_tools description: Various repository development tools for flutter. environment: - sdk: ">=2.13.0 <3.0.0" + sdk: ">=2.17.0-0 <3.0.0" dependencies: archive: 3.1.11