From 2cbad4b3ae9c534376bcb646afc91ebd7db324d7 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 17 May 2022 15:35:07 -0700 Subject: [PATCH] Final chapter: migrate api doc samples to super-parameters (#104007) --- examples/api/analysis_options.yaml | 4 --- .../api/lib/animation/curves/curve2_d.0.dart | 8 ++--- .../cupertino_activity_indicator.0.dart | 4 +-- .../bottom_tab_bar/cupertino_tab_bar.0.dart | 4 +-- .../cupertino/button/cupertino_button.0.dart | 4 +-- .../cupertino_context_menu.0.dart | 4 +-- .../date_picker/cupertino_date_picker.0.dart | 4 +-- .../date_picker/cupertino_timer_picker.0.dart | 4 +-- .../dialog/cupertino_action_sheet.0.dart | 4 +-- .../dialog/cupertino_alert_dialog.0.dart | 4 +-- .../form_row/cupertino_form_row.0.dart | 8 ++--- .../nav_bar/cupertino_navigation_bar.0.dart | 4 +-- .../nav_bar/cupertino_sliver_nav_bar.0.dart | 6 ++-- .../cupertino_page_scaffold.0.dart | 4 +-- .../cupertino/picker/cupertino_picker.0.dart | 4 +-- .../cupertino_sliver_refresh_control.0.dart | 4 +-- .../route/show_cupertino_dialog.0.dart | 4 +-- .../route/show_cupertino_modal_popup.0.dart | 4 +-- .../scrollbar/cupertino_scrollbar.0.dart | 4 +-- .../scrollbar/cupertino_scrollbar.1.dart | 4 +-- .../cupertino_search_field.0.dart | 4 +-- .../cupertino_search_field.1.dart | 8 ++--- .../cupertino_segmented_control.0.dart | 4 +-- ...cupertino_sliding_segmented_control.0.dart | 4 +-- .../cupertino/slider/cupertino_slider.0.dart | 4 +-- .../cupertino/switch/cupertino_switch.0.dart | 4 +-- .../cupertino_tab_controller.0.dart | 4 +-- .../cupertino_tab_scaffold.0.dart | 4 +-- .../text_field/cupertino_text_field.0.dart | 4 +-- .../cupertino_text_form_field_row.1.dart | 4 +-- .../change_notifier/change_notifier.0.dart | 4 +-- .../pointer_signal_resolver.0.dart | 8 ++--- .../lib/material/about/about_list_tile.0.dart | 4 +-- .../api/lib/material/app_bar/app_bar.0.dart | 4 +-- .../api/lib/material/app_bar/app_bar.1.dart | 4 +-- .../material/app_bar/sliver_app_bar.1.dart | 4 +-- .../material/autocomplete/autocomplete.0.dart | 4 +-- .../material/autocomplete/autocomplete.1.dart | 4 +-- .../material/banner/material_banner.0.dart | 4 +-- .../material/banner/material_banner.1.dart | 4 +-- .../bottom_app_bar/bottom_app_bar.1.dart | 2 +- .../bottom_navigation_bar.0.dart | 4 +-- .../bottom_navigation_bar.1.dart | 4 +-- .../show_modal_bottom_sheet.0.dart | 4 +-- .../material/button_style/button_style.0.dart | 6 ++-- examples/api/lib/material/card/card.0.dart | 4 +-- examples/api/lib/material/card/card.1.dart | 4 +-- examples/api/lib/material/card/card.2.dart | 8 ++--- .../api/lib/material/checkbox/checkbox.0.dart | 4 +-- .../checkbox_list_tile.0.dart | 4 +-- .../checkbox_list_tile.1.dart | 8 ++--- .../checkbox_list_tile.2.dart | 8 ++--- ...eletable_chip_attributes.on_deleted.0.dart | 6 ++-- .../lib/material/data_table/data_table.0.dart | 4 +-- .../lib/material/data_table/data_table.1.dart | 4 +-- .../date_picker/show_date_picker.0.dart | 4 +-- .../date_picker/show_date_range_picker.0.dart | 4 +-- .../lib/material/dialog/alert_dialog.0.dart | 4 +-- .../lib/material/dialog/alert_dialog.1.dart | 4 +-- .../lib/material/dialog/show_dialog.0.dart | 4 +-- .../lib/material/dialog/show_dialog.1.dart | 4 +-- .../lib/material/dialog/show_dialog.2.dart | 4 +-- .../api/lib/material/divider/divider.0.dart | 4 +-- .../material/divider/vertical_divider.0.dart | 4 +-- .../material/dropdown/dropdown_button.0.dart | 4 +-- ...opdown_button.selected_item_builder.0.dart | 4 +-- .../dropdown/dropdown_button.style.0.dart | 4 +-- .../elevated_button/elevated_button.0.dart | 4 +-- .../expansion_panel_list.0.dart | 4 +-- ...nel_list.expansion_panel_list_radio.0.dart | 4 +-- .../expansion_tile/expansion_tile.0.dart | 4 +-- .../flexible_space_bar.0.dart | 2 +- .../floating_action_button.0.dart | 4 +-- .../floating_action_button.1.dart | 4 +-- .../floating_action_button.2.dart | 4 +-- .../floating_action_button.3.dart | 4 +-- .../standard_fab_location.0.dart | 4 +-- .../material/icon_button/icon_button.0.dart | 4 +-- .../material/icon_button/icon_button.1.dart | 4 +-- .../lib/material/ink/ink.image_clip.0.dart | 2 +- .../lib/material/ink/ink.image_clip.1.dart | 2 +- .../api/lib/material/ink_well/ink_well.0.dart | 4 +-- .../input_decorator/input_decoration.0.dart | 4 +-- .../input_decorator/input_decoration.1.dart | 4 +-- .../input_decorator/input_decoration.2.dart | 4 +-- .../input_decorator/input_decoration.3.dart | 4 +-- ...coration.floating_label_style_error.0.dart | 4 +-- .../input_decoration.label.0.dart | 4 +-- .../input_decoration.label_style_error.0.dart | 4 +-- .../input_decoration.material_state.0.dart | 4 +-- .../input_decoration.material_state.1.dart | 4 +-- .../input_decoration.prefix_icon.0.dart | 4 +-- ..._decoration.prefix_icon_constraints.0.dart | 4 +-- .../input_decoration.suffix_icon.0.dart | 4 +-- ..._decoration.suffix_icon_constraints.0.dart | 4 +-- .../lib/material/list_tile/list_tile.4.dart | 11 ++++--- .../lib/material/list_tile/list_tile.5.dart | 11 ++++--- .../list_tile/list_tile.selected.0.dart | 4 +-- .../material_state_border_side.0.dart | 4 +-- .../material_state_mouse_cursor.0.dart | 4 +-- .../material_state_outlined_border.0.dart | 4 +-- .../material_state_property.0.dart | 4 +-- .../navigation_bar/navigation_bar.0.dart | 12 ++++---- .../navigation_bar/navigation_bar.dart | 4 +-- .../navigation_rail/navigation_rail.0.dart | 4 +-- .../navigation_rail/navigation_rail.1.dart | 4 +-- .../navigation_rail.extended_animation.0.dart | 6 ++-- .../outlined_button/outlined_button.0.dart | 4 +-- .../platform_menu_bar.0.dart | 4 +-- .../lib/material/popupmenu/popupmenu.0.dart | 4 +-- .../circular_progress_indicator.0.dart | 4 +-- .../linear_progress_indicator.0.dart | 4 +-- examples/api/lib/material/radio/radio.0.dart | 4 +-- .../material/radio/radio.toggleable.0.dart | 4 +-- .../radio_list_tile/radio_list_tile.0.dart | 4 +-- .../radio_list_tile/radio_list_tile.1.dart | 8 ++--- .../radio_list_tile/radio_list_tile.2.dart | 8 ++--- .../radio_list_tile.toggleable.0.dart | 4 +-- .../material/range_slider/range_slider.0.dart | 4 +-- .../refresh_indicator.0.dart | 4 +-- .../reorderable_list_view.0.dart | 4 +-- .../reorderable_list_view.1.dart | 4 +-- ...ist_view.build_default_drag_handles.0.dart | 4 +-- ..._view.reorderable_list_view_builder.0.dart | 4 +-- .../api/lib/material/scaffold/scaffold.0.dart | 4 +-- .../api/lib/material/scaffold/scaffold.1.dart | 4 +-- .../api/lib/material/scaffold/scaffold.2.dart | 4 +-- .../material/scaffold/scaffold.drawer.0.dart | 4 +-- .../scaffold/scaffold.end_drawer.0.dart | 4 +-- .../lib/material/scaffold/scaffold.of.0.dart | 4 +-- .../lib/material/scaffold/scaffold.of.1.dart | 4 +-- .../scaffold/scaffold_messenger.0.dart | 4 +-- .../scaffold/scaffold_messenger.of.0.dart | 4 +-- .../scaffold/scaffold_messenger.of.1.dart | 2 +- ...essenger_state.show_material_banner.0.dart | 4 +-- ...fold_messenger_state.show_snack_bar.0.dart | 4 +-- .../scaffold_state.show_bottom_sheet.0.dart | 4 +-- .../scaffold_state.show_snack_bar.0.dart | 4 +-- .../lib/material/scrollbar/scrollbar.0.dart | 4 +-- .../lib/material/scrollbar/scrollbar.1.dart | 4 +-- .../api/lib/material/slider/slider.0.dart | 4 +-- .../lib/material/snack_bar/snack_bar.0.dart | 4 +-- .../lib/material/snack_bar/snack_bar.1.dart | 4 +-- .../api/lib/material/stepper/stepper.0.dart | 4 +-- .../stepper/stepper.controls_builder.0.dart | 4 +-- .../switch_list_tile/switch_list_tile.0.dart | 4 +-- .../switch_list_tile/switch_list_tile.1.dart | 8 ++--- .../switch_list_tile/switch_list_tile.2.dart | 8 ++--- .../tab_controller/tab_controller.1.dart | 4 +-- examples/api/lib/material/tabs/tab_bar.0.dart | 4 +-- examples/api/lib/material/tabs/tab_bar.1.dart | 4 +-- .../material/text_button/text_button.0.dart | 4 +-- .../lib/material/text_field/text_field.1.dart | 4 +-- .../text_form_field/text_form_field.1.dart | 4 +-- .../lib/material/theme/theme_extension.1.dart | 6 ++-- .../toggle_buttons/toggle_buttons.0.dart | 4 +-- .../api/lib/material/tooltip/tooltip.0.dart | 4 +-- .../api/lib/material/tooltip/tooltip.1.dart | 4 +-- .../api/lib/material/tooltip/tooltip.2.dart | 4 +-- .../api/lib/material/tooltip/tooltip.3.dart | 4 +-- .../painting/gradient/linear_gradient.0.dart | 4 +-- ...elegate_with_fixed_cross_axis_count.0.dart | 4 +-- ...elegate_with_fixed_cross_axis_count.1.dart | 4 +-- .../keyboard_key/logical_keyboard_key.0.dart | 4 +-- .../keyboard_key/physical_keyboard_key.0.dart | 4 +-- .../services/mouse_cursor/mouse_cursor.0.dart | 4 +-- ...chrome.set_system_u_i_overlay_style.1.dart | 4 +-- examples/api/lib/ui/text/font_feature.0.dart | 4 +-- ...nt_feature.font_feature_alternative.0.dart | 4 +-- ....font_feature_alternative_fractions.0.dart | 4 +-- ...e.font_feature_case_sensitive_forms.0.dart | 4 +-- ...ture.font_feature_character_variant.0.dart | 4 +-- ....font_feature_contextual_alternates.0.dart | 4 +-- ...nt_feature.font_feature_denominator.0.dart | 4 +-- ...font_feature.font_feature_fractions.0.dart | 4 +-- ...ature.font_feature_historical_forms.0.dart | 4 +-- ...e.font_feature_historical_ligatures.0.dart | 4 +-- ...feature.font_feature_lining_figures.0.dart | 4 +-- ...t_feature.font_feature_locale_aware.0.dart | 4 +-- ...ature.font_feature_notational_forms.0.dart | 4 +-- ...ont_feature.font_feature_numerators.0.dart | 4 +-- ...ature.font_feature_oldstyle_figures.0.dart | 4 +-- ..._feature.font_feature_ordinal_forms.0.dart | 4 +-- ...e.font_feature_proportional_figures.0.dart | 4 +-- ...e.font_feature_scientific_inferiors.0.dart | 4 +-- ...t_feature.font_feature_slashed_zero.0.dart | 4 +-- ...e.font_feature_stylistic_alternates.0.dart | 4 +-- ..._feature.font_feature_stylistic_set.0.dart | 4 +-- ..._feature.font_feature_stylistic_set.1.dart | 4 +-- ...ont_feature.font_feature_subscripts.0.dart | 4 +-- ...t_feature.font_feature_superscripts.0.dart | 4 +-- .../font_feature.font_feature_swash.0.dart | 4 +-- ...eature.font_feature_tabular_figures.0.dart | 4 +-- .../actions/action.action_overridable.0.dart | 6 ++-- .../widgets/actions/action_listener.0.dart | 6 ++-- .../api/lib/widgets/actions/actions.0.dart | 6 ++-- .../actions/focusable_action_detector.0.dart | 8 ++--- .../animated_list/animated_list.0.dart | 7 ++--- .../animated_list/sliver_animated_list.0.dart | 7 ++--- .../animated_size/animated_size.0.dart | 4 +-- .../animated_switcher.0.dart | 4 +-- .../lib/widgets/async/future_builder.0.dart | 4 +-- .../lib/widgets/async/stream_builder.0.dart | 4 +-- .../autocomplete/raw_autocomplete.0.dart | 4 +-- .../autocomplete/raw_autocomplete.1.dart | 4 +-- .../autocomplete/raw_autocomplete.2.dart | 4 +-- .../raw_autocomplete.focus_node.0.dart | 4 +-- .../widgets/autofill/autofill_group.0.dart | 4 +-- .../lib/widgets/basic/absorb_pointer.0.dart | 4 +-- .../api/lib/widgets/basic/aspect_ratio.0.dart | 4 +-- .../api/lib/widgets/basic/aspect_ratio.1.dart | 4 +-- .../api/lib/widgets/basic/aspect_ratio.2.dart | 4 +-- .../api/lib/widgets/basic/clip_rrect.0.dart | 4 +-- .../api/lib/widgets/basic/clip_rrect.1.dart | 6 ++-- .../basic/custom_multi_child_layout.0.dart | 4 +-- .../api/lib/widgets/basic/expanded.0.dart | 4 +-- .../api/lib/widgets/basic/expanded.1.dart | 4 +-- .../api/lib/widgets/basic/fitted_box.0.dart | 4 +-- examples/api/lib/widgets/basic/flow.0.dart | 4 +-- .../basic/fractionally_sized_box.0.dart | 4 +-- .../lib/widgets/basic/ignore_pointer.0.dart | 4 +-- .../api/lib/widgets/basic/listener.0.dart | 4 +-- .../api/lib/widgets/basic/mouse_region.0.dart | 4 +-- .../widgets/basic/mouse_region.on_exit.0.dart | 4 +-- .../widgets/basic/mouse_region.on_exit.1.dart | 7 ++--- .../api/lib/widgets/basic/offstage.0.dart | 4 +-- .../lib/widgets/basic/physical_shape.0.dart | 4 +-- .../binding/widget_binding_observer.0.dart | 4 +-- .../color_filter/color_filtered.0.dart | 4 +-- .../widgets/dismissible/dismissible.0.dart | 4 +-- .../lib/widgets/drag_target/draggable.0.dart | 4 +-- .../editable_text.on_changed.0.dart | 4 +-- .../text_editing_controller.0.dart | 4 +-- .../widgets/focus_manager/focus_node.0.dart | 6 ++-- .../focus_manager/focus_node.unfocus.0.dart | 4 +-- .../api/lib/widgets/focus_scope/focus.0.dart | 4 +-- .../api/lib/widgets/focus_scope/focus.1.dart | 8 ++--- .../api/lib/widgets/focus_scope/focus.2.dart | 4 +-- .../widgets/focus_scope/focus_scope.0.dart | 8 ++--- .../focus_traversal_group.0.dart | 8 ++--- .../ordered_traversal_policy.0.dart | 8 ++--- examples/api/lib/widgets/form/form.0.dart | 4 +-- .../lib/widgets/framework/error_widget.0.dart | 2 +- .../gesture_detector/gesture_detector.0.dart | 4 +-- .../gesture_detector/gesture_detector.1.dart | 4 +-- examples/api/lib/widgets/heroes/hero.0.dart | 6 ++-- examples/api/lib/widgets/heroes/hero.1.dart | 8 ++--- .../widgets/image/image.error_builder.0.dart | 4 +-- .../widgets/image/image.frame_builder.0.dart | 4 +-- .../image/image.loading_builder.0.dart | 4 +-- .../implicit_animations/animated_align.0.dart | 4 +-- .../animated_container.0.dart | 4 +-- .../animated_padding.0.dart | 4 +-- .../animated_positioned.0.dart | 4 +-- .../implicit_animations/animated_slide.0.dart | 4 +-- .../sliver_animated_opacity.0.dart | 4 +-- .../inherited_notifier.0.dart | 14 ++++----- .../inherited_theme/inherited_theme.0.dart | 4 +-- .../interactive_viewer.0.dart | 4 +-- .../interactive_viewer.builder.0.dart | 2 +- .../interactive_viewer.constrained.0.dart | 4 +-- ...ve_viewer.transformation_controller.0.dart | 4 +-- .../layout_builder/layout_builder.0.dart | 4 +-- ...ia_query_data.system_gesture_insets.0.dart | 4 +-- .../lib/widgets/navigator/navigator.0.dart | 12 ++++---- .../navigator.restorable_push.0.dart | 4 +-- ...or.restorable_push_and_remove_until.0.dart | 4 +-- ...vigator.restorable_push_replacement.0.dart | 4 +-- .../navigator_state.restorable_push.0.dart | 4 +-- ...te.restorable_push_and_remove_until.0.dart | 4 +-- ...r_state.restorable_push_replacement.0.dart | 4 +-- .../navigator/restorable_route_future.0.dart | 6 ++-- .../nested_scroll_view.0.dart | 4 +-- .../nested_scroll_view.1.dart | 4 +-- .../nested_scroll_view.2.dart | 4 +-- .../nested_scroll_view_state.0.dart | 4 +-- .../notification_listener/notification.0.dart | 4 +-- .../widgets/overflow_bar/overflow_bar.0.dart | 4 +-- .../glowing_overscroll_indicator.0.dart | 4 +-- .../glowing_overscroll_indicator.1.dart | 4 +-- .../widgets/page_storage/page_storage.0.dart | 6 ++-- .../lib/widgets/page_view/page_view.0.dart | 4 +-- .../preferred_size/preferred_size.0.dart | 6 ++-- .../restoration/restoration_mixin.0.dart | 4 +-- .../restorable_value.0.dart | 4 +-- .../widgets/routes/show_general_dialog.0.dart | 4 +-- .../scroll_metrics_notification.0.dart | 2 +- .../scroll_view/custom_scroll_view.1.dart | 4 +-- .../scroll_view/listview_select.1.dart | 12 ++++---- .../widgets/scrollbar/raw_scrollbar.0.dart | 4 +-- .../widgets/scrollbar/raw_scrollbar.1.dart | 4 +-- .../widgets/scrollbar/raw_scrollbar.2.dart | 4 +-- .../scrollbar/raw_scrollbar.shape.0.dart | 4 +-- .../shared_app_data/shared_app_data.0.dart | 4 +-- .../shared_app_data/shared_app_data.1.dart | 4 +-- .../shortcuts/character_activator.0.dart | 4 +-- .../widgets/shortcuts/logical_key_set.0.dart | 4 +-- .../lib/widgets/shortcuts/shortcuts.0.dart | 4 +-- .../lib/widgets/shortcuts/shortcuts.1.dart | 4 +-- .../single_activator.single_activator.0.dart | 4 +-- .../single_child_scroll_view.0.dart | 4 +-- .../single_child_scroll_view.1.dart | 4 +-- .../sliver_fill/sliver_fill_remaining.0.dart | 4 +-- .../sliver_fill/sliver_fill_remaining.1.dart | 4 +-- .../sliver_fill/sliver_fill_remaining.2.dart | 4 +-- .../sliver_fill/sliver_fill_remaining.3.dart | 4 +-- ...ti_child_render_object_widget_mixin.0.dart | 6 ++-- examples/api/lib/widgets/table/table.0.dart | 4 +-- .../transitions/align_transition.0.dart | 4 +-- .../transitions/animated_builder.0.dart | 4 +-- .../transitions/animated_widget.0.dart | 8 ++--- .../decorated_box_transition.0.dart | 4 +-- .../default_text_style_transition.0.dart | 4 +-- .../transitions/fade_transition.0.dart | 4 +-- .../transitions/positioned_transition.0.dart | 4 +-- .../relative_positioned_transition.0.dart | 4 +-- .../transitions/rotation_transition.0.dart | 4 +-- .../transitions/scale_transition.0.dart | 4 +-- .../transitions/size_transition.0.dart | 4 +-- .../transitions/slide_transition.0.dart | 4 +-- .../transitions/sliver_fade_transition.0.dart | 4 +-- .../tween_animation_builder.0.dart | 4 +-- .../will_pop_scope/will_pop_scope.0.dart | 4 +-- .../src/animation/animation_controller.dart | 2 +- .../cupertino/sliding_segmented_control.dart | 2 +- packages/flutter/lib/src/material/chip.dart | 4 +-- .../flutter/lib/src/material/chip_choice.dart | 2 +- .../flutter/lib/src/material/chip_filter.dart | 2 +- .../flutter/lib/src/material/chip_theme.dart | 4 +-- .../flutter/lib/src/material/feedback.dart | 4 +-- .../src/material/material_state_mixin.dart | 4 +-- .../lib/src/material/slider_theme.dart | 4 +-- .../lib/src/material/tab_controller.dart | 2 +- .../flutter/lib/src/material/text_theme.dart | 4 +-- .../flutter/lib/src/painting/image_cache.dart | 2 +- .../lib/src/painting/image_provider.dart | 8 ++--- .../lib/src/painting/image_resolution.dart | 4 +-- .../flutter/lib/src/painting/text_span.dart | 2 +- .../flutter/lib/src/rendering/proxy_box.dart | 2 +- packages/flutter/lib/src/widgets/basic.dart | 2 +- packages/flutter/lib/src/widgets/binding.dart | 4 +-- .../default_text_editing_shortcuts.dart | 2 +- .../widgets/draggable_scrollable_sheet.dart | 2 +- .../flutter/lib/src/widgets/framework.dart | 30 +++++++++---------- .../lib/src/widgets/gesture_detector.dart | 4 +-- .../lib/src/widgets/implicit_animations.dart | 8 ++--- .../flutter/lib/src/widgets/navigator.dart | 4 +-- .../flutter/lib/src/widgets/page_view.dart | 6 ++-- packages/flutter/lib/src/widgets/routes.dart | 10 +++---- .../lib/src/widgets/scroll_physics.dart | 4 +-- .../flutter/lib/src/widgets/scroll_view.dart | 2 +- .../src/widgets/value_listenable_builder.dart | 2 +- 352 files changed, 779 insertions(+), 788 deletions(-) diff --git a/examples/api/analysis_options.yaml b/examples/api/analysis_options.yaml index 7e59ed2a79..76be938a6b 100644 --- a/examples/api/analysis_options.yaml +++ b/examples/api/analysis_options.yaml @@ -6,7 +6,3 @@ linter: rules: # Samples want to print things pretty often. avoid_print: false - # TODO(goderbauer): enable when super params are more established and - # seeing them in the API samples is no longer surprising, - # https://github.com/flutter/flutter/issues/101068 - use_super_parameters: false diff --git a/examples/api/lib/animation/curves/curve2_d.0.dart b/examples/api/lib/animation/curves/curve2_d.0.dart index 9aeb10c673..98b89dc5c9 100644 --- a/examples/api/lib/animation/curves/curve2_d.0.dart +++ b/examples/api/lib/animation/curves/curve2_d.0.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}); static const String _title = 'Flutter Code Sample'; @@ -43,12 +43,12 @@ final CatmullRomSpline path = CatmullRomSpline( class FollowCurve2D extends StatefulWidget { const FollowCurve2D({ - Key? key, + super.key, required this.path, this.curve = Curves.easeInOut, required this.child, this.duration = const Duration(seconds: 1), - }) : super(key: key); + }); final Curve2D path; final Curve curve; @@ -97,7 +97,7 @@ class _FollowCurve2DState extends State } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/cupertino/activity_indicator/cupertino_activity_indicator.0.dart b/examples/api/lib/cupertino/activity_indicator/cupertino_activity_indicator.0.dart index 35b44016b5..8445ceaf12 100644 --- a/examples/api/lib/cupertino/activity_indicator/cupertino_activity_indicator.0.dart +++ b/examples/api/lib/cupertino/activity_indicator/cupertino_activity_indicator.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const CupertinoIndicatorApp()); class CupertinoIndicatorApp extends StatelessWidget { - const CupertinoIndicatorApp({Key? key}) : super(key: key); + const CupertinoIndicatorApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class CupertinoIndicatorApp extends StatelessWidget { } class CupertinoIndicatorExample extends StatelessWidget { - const CupertinoIndicatorExample({Key? key}) : super(key: key); + const CupertinoIndicatorExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/cupertino/bottom_tab_bar/cupertino_tab_bar.0.dart b/examples/api/lib/cupertino/bottom_tab_bar/cupertino_tab_bar.0.dart index 88abfdfcca..ad23ad6dd8 100644 --- a/examples/api/lib/cupertino/bottom_tab_bar/cupertino_tab_bar.0.dart +++ b/examples/api/lib/cupertino/bottom_tab_bar/cupertino_tab_bar.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const CupertinoTabBarApp()); class CupertinoTabBarApp extends StatelessWidget { - const CupertinoTabBarApp({Key? key}) : super(key: key); + const CupertinoTabBarApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class CupertinoTabBarApp extends StatelessWidget { } class CupertinoTabBarExample extends StatelessWidget { - const CupertinoTabBarExample({Key? key}) : super(key: key); + const CupertinoTabBarExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/cupertino/button/cupertino_button.0.dart b/examples/api/lib/cupertino/button/cupertino_button.0.dart index 84740d97f1..974a66c6d8 100644 --- a/examples/api/lib/cupertino/button/cupertino_button.0.dart +++ b/examples/api/lib/cupertino/button/cupertino_button.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const CupertinoButtonApp()); class CupertinoButtonApp extends StatelessWidget { - const CupertinoButtonApp({Key? key}) : super(key: key); + const CupertinoButtonApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class CupertinoButtonApp extends StatelessWidget { } class CupertinoButtonExample extends StatelessWidget { - const CupertinoButtonExample({Key? key}) : super(key: key); + const CupertinoButtonExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart b/examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart index c74410a207..7240d93c60 100644 --- a/examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart +++ b/examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ContextMenuApp()); class ContextMenuApp extends StatelessWidget { - const ContextMenuApp({Key? key}) : super(key: key); + const ContextMenuApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ContextMenuApp extends StatelessWidget { } class ContextMenuExample extends StatelessWidget { - const ContextMenuExample({Key? key}) : super(key: key); + const ContextMenuExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/cupertino/date_picker/cupertino_date_picker.0.dart b/examples/api/lib/cupertino/date_picker/cupertino_date_picker.0.dart index 0fa8f12187..dcef469556 100644 --- a/examples/api/lib/cupertino/date_picker/cupertino_date_picker.0.dart +++ b/examples/api/lib/cupertino/date_picker/cupertino_date_picker.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const DatePickerApp()); class DatePickerApp extends StatelessWidget { - const DatePickerApp({Key? key}) : super(key: key); + const DatePickerApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class DatePickerApp extends StatelessWidget { } class DatePickerExample extends StatefulWidget { - const DatePickerExample({Key? key}) : super(key: key); + const DatePickerExample({super.key}); @override State createState() => _DatePickerExampleState(); diff --git a/examples/api/lib/cupertino/date_picker/cupertino_timer_picker.0.dart b/examples/api/lib/cupertino/date_picker/cupertino_timer_picker.0.dart index fb0f4ea4ad..a3191f973c 100644 --- a/examples/api/lib/cupertino/date_picker/cupertino_timer_picker.0.dart +++ b/examples/api/lib/cupertino/date_picker/cupertino_timer_picker.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const TimerPickerApp()); class TimerPickerApp extends StatelessWidget { - const TimerPickerApp({Key? key}) : super(key: key); + const TimerPickerApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class TimerPickerApp extends StatelessWidget { } class TimerPickerExample extends StatefulWidget { - const TimerPickerExample({Key? key}) : super(key: key); + const TimerPickerExample({super.key}); @override State createState() => _TimerPickerExampleState(); diff --git a/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart b/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart index ed761241a8..f9ac845088 100644 --- a/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart +++ b/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const ActionSheetApp()); class ActionSheetApp extends StatelessWidget { - const ActionSheetApp({Key? key}) : super(key: key); + const ActionSheetApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class ActionSheetApp extends StatelessWidget { } class ActionSheetExample extends StatelessWidget { - const ActionSheetExample({Key? key}) : super(key: key); + const ActionSheetExample({super.key}); // This shows a CupertinoModalPopup which hosts a CupertinoActionSheet. void _showActionSheet(BuildContext context) { diff --git a/examples/api/lib/cupertino/dialog/cupertino_alert_dialog.0.dart b/examples/api/lib/cupertino/dialog/cupertino_alert_dialog.0.dart index 9c0ab10a53..ffe536f732 100644 --- a/examples/api/lib/cupertino/dialog/cupertino_alert_dialog.0.dart +++ b/examples/api/lib/cupertino/dialog/cupertino_alert_dialog.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const AlertDialogApp()); class AlertDialogApp extends StatelessWidget { - const AlertDialogApp({Key? key}) : super(key: key); + const AlertDialogApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class AlertDialogApp extends StatelessWidget { } class AlertDialogExample extends StatelessWidget { - const AlertDialogExample({Key? key}) : super(key: key); + const AlertDialogExample({super.key}); // This shows a CupertinoModalPopup which hosts a CupertinoAlertDialog. void _showAlertDialog(BuildContext context) { diff --git a/examples/api/lib/cupertino/form_row/cupertino_form_row.0.dart b/examples/api/lib/cupertino/form_row/cupertino_form_row.0.dart index 75990a7737..4c46b6d601 100644 --- a/examples/api/lib/cupertino/form_row/cupertino_form_row.0.dart +++ b/examples/api/lib/cupertino/form_row/cupertino_form_row.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const CupertinoFormRowApp()); class CupertinoFormRowApp extends StatelessWidget { - const CupertinoFormRowApp({Key? key}) : super(key: key); + const CupertinoFormRowApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class CupertinoFormRowApp extends StatelessWidget { } class CupertinoFormRowExample extends StatefulWidget { - const CupertinoFormRowExample({Key? key}) : super(key: key); + const CupertinoFormRowExample({super.key}); @override State createState() => _CupertinoFormRowExampleState(); @@ -114,11 +114,11 @@ class _CupertinoFormRowExampleState extends State { class PrefixWidget extends StatelessWidget { const PrefixWidget({ - Key? key, + super.key, required this.icon, required this.title, required this.color, - }) : super(key: key); + }); final IconData icon; final String title; diff --git a/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.0.dart b/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.0.dart index 9266298f0e..3e53cfb8d0 100644 --- a/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.0.dart +++ b/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const NavBarApp()); class NavBarApp extends StatelessWidget { - const NavBarApp({Key? key}) : super(key: key); + const NavBarApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class NavBarApp extends StatelessWidget { } class NavBarExample extends StatefulWidget { - const NavBarExample({Key? key}) : super(key: key); + const NavBarExample({super.key}); @override State createState() => _NavBarExampleState(); diff --git a/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart b/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart index 5d8fa0e65a..a8c6a875f1 100644 --- a/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart +++ b/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const SliverNavBarApp()); class SliverNavBarApp extends StatelessWidget { - const SliverNavBarApp({Key? key}) : super(key: key); + const SliverNavBarApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class SliverNavBarApp extends StatelessWidget { } class SliverNavBarExample extends StatelessWidget { - const SliverNavBarExample({Key? key}) : super(key: key); + const SliverNavBarExample({super.key}); @override Widget build(BuildContext context) { @@ -63,7 +63,7 @@ class SliverNavBarExample extends StatelessWidget { } class NextPage extends StatelessWidget { - const NextPage({ Key? key }) : super(key: key); + const NextPage({ super.key }); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/cupertino/page_scaffold/cupertino_page_scaffold.0.dart b/examples/api/lib/cupertino/page_scaffold/cupertino_page_scaffold.0.dart index 919520db0b..9263d70791 100644 --- a/examples/api/lib/cupertino/page_scaffold/cupertino_page_scaffold.0.dart +++ b/examples/api/lib/cupertino/page_scaffold/cupertino_page_scaffold.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const PageScaffoldApp()); class PageScaffoldApp extends StatelessWidget { - const PageScaffoldApp({Key? key}) : super(key: key); + const PageScaffoldApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class PageScaffoldApp extends StatelessWidget { } class PageScaffoldExample extends StatefulWidget { - const PageScaffoldExample({Key? key}) : super(key: key); + const PageScaffoldExample({super.key}); @override State createState() => _PageScaffoldExampleState(); diff --git a/examples/api/lib/cupertino/picker/cupertino_picker.0.dart b/examples/api/lib/cupertino/picker/cupertino_picker.0.dart index 70197e9888..3520e582fd 100644 --- a/examples/api/lib/cupertino/picker/cupertino_picker.0.dart +++ b/examples/api/lib/cupertino/picker/cupertino_picker.0.dart @@ -19,7 +19,7 @@ const List _fruitNames = [ void main() => runApp(const CupertinoPickerApp()); class CupertinoPickerApp extends StatelessWidget { - const CupertinoPickerApp({Key? key}) : super(key: key); + const CupertinoPickerApp({super.key}); @override Widget build(BuildContext context) { @@ -30,7 +30,7 @@ class CupertinoPickerApp extends StatelessWidget { } } class CupertinoPickerExample extends StatefulWidget { - const CupertinoPickerExample({Key? key}) : super(key: key); + const CupertinoPickerExample({super.key}); @override State createState() => _CupertinoPickerExampleState(); diff --git a/examples/api/lib/cupertino/refresh/cupertino_sliver_refresh_control.0.dart b/examples/api/lib/cupertino/refresh/cupertino_sliver_refresh_control.0.dart index 3426f57f3f..17b63dfe58 100644 --- a/examples/api/lib/cupertino/refresh/cupertino_sliver_refresh_control.0.dart +++ b/examples/api/lib/cupertino/refresh/cupertino_sliver_refresh_control.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const RefreshControlApp()); class RefreshControlApp extends StatelessWidget { - const RefreshControlApp({Key? key}) : super(key: key); + const RefreshControlApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class RefreshControlApp extends StatelessWidget { } class RefreshControlExample extends StatefulWidget { - const RefreshControlExample({Key? key}) : super(key: key); + const RefreshControlExample({super.key}); @override State createState() => _RefreshControlExampleState(); diff --git a/examples/api/lib/cupertino/route/show_cupertino_dialog.0.dart b/examples/api/lib/cupertino/route/show_cupertino_dialog.0.dart index afeed56e4a..762acbe484 100644 --- a/examples/api/lib/cupertino/route/show_cupertino_dialog.0.dart +++ b/examples/api/lib/cupertino/route/show_cupertino_dialog.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const CupertinoDialogApp()); class CupertinoDialogApp extends StatelessWidget { - const CupertinoDialogApp({Key? key}) : super(key: key); + const CupertinoDialogApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class CupertinoDialogApp extends StatelessWidget { } class CupertinoDialogExample extends StatelessWidget { - const CupertinoDialogExample({Key? key}) : super(key: key); + const CupertinoDialogExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/cupertino/route/show_cupertino_modal_popup.0.dart b/examples/api/lib/cupertino/route/show_cupertino_modal_popup.0.dart index 924fb4ff68..1547487f44 100644 --- a/examples/api/lib/cupertino/route/show_cupertino_modal_popup.0.dart +++ b/examples/api/lib/cupertino/route/show_cupertino_modal_popup.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const ModalPopupApp()); class ModalPopupApp extends StatelessWidget { - const ModalPopupApp({Key? key}) : super(key: key); + const ModalPopupApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ModalPopupApp extends StatelessWidget { } class ModalPopupExample extends StatelessWidget { - const ModalPopupExample({Key? key}) : super(key: key); + const ModalPopupExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.0.dart b/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.0.dart index aa5b2bd852..512497be9a 100644 --- a/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.0.dart +++ b/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const ScrollbarApp()); class ScrollbarApp extends StatelessWidget { - const ScrollbarApp({Key? key}) : super(key: key); + const ScrollbarApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class ScrollbarApp extends StatelessWidget { } class ScrollbarExample extends StatelessWidget { - const ScrollbarExample({Key? key}) : super(key: key); + const ScrollbarExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.1.dart b/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.1.dart index 3867825d2d..b6ec2dc267 100644 --- a/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.1.dart +++ b/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.1.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const ScrollbarApp()); class ScrollbarApp extends StatelessWidget { - const ScrollbarApp({Key? key}) : super(key: key); + const ScrollbarApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class ScrollbarApp extends StatelessWidget { } class ScrollbarExample extends StatefulWidget { - const ScrollbarExample({Key? key}) : super(key: key); + const ScrollbarExample({super.key}); @override State createState() => _ScrollbarExampleState(); diff --git a/examples/api/lib/cupertino/search_field/cupertino_search_field.0.dart b/examples/api/lib/cupertino/search_field/cupertino_search_field.0.dart index a8e0438778..b63061a939 100644 --- a/examples/api/lib/cupertino/search_field/cupertino_search_field.0.dart +++ b/examples/api/lib/cupertino/search_field/cupertino_search_field.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const SearchTextFieldApp()); class SearchTextFieldApp extends StatelessWidget { - const SearchTextFieldApp({Key? key}) : super(key: key); + const SearchTextFieldApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class SearchTextFieldApp extends StatelessWidget { } class SearchTextFieldExample extends StatefulWidget { - const SearchTextFieldExample({Key? key}) : super(key: key); + const SearchTextFieldExample({super.key}); @override State createState() => _SearchTextFieldExampleState(); diff --git a/examples/api/lib/cupertino/search_field/cupertino_search_field.1.dart b/examples/api/lib/cupertino/search_field/cupertino_search_field.1.dart index 65d444c65a..33b8cb427a 100644 --- a/examples/api/lib/cupertino/search_field/cupertino_search_field.1.dart +++ b/examples/api/lib/cupertino/search_field/cupertino_search_field.1.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const SearchTextFieldApp()); class SearchTextFieldApp extends StatelessWidget { - const SearchTextFieldApp({Key? key}) : super(key: key); + const SearchTextFieldApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class SearchTextFieldApp extends StatelessWidget { } class SearchTextFieldExample extends StatefulWidget { - const SearchTextFieldExample({Key? key}) : super(key: key); + const SearchTextFieldExample({super.key}); @override State createState() => _SearchTextFieldExampleState(); @@ -60,9 +60,9 @@ class _SearchTextFieldExampleState extends State { class SearchTextField extends StatelessWidget { const SearchTextField({ - Key? key, + super.key, required this.fieldValue, - }) : super(key: key); + }); final ValueChanged fieldValue; diff --git a/examples/api/lib/cupertino/segmented_control/cupertino_segmented_control.0.dart b/examples/api/lib/cupertino/segmented_control/cupertino_segmented_control.0.dart index 4861649c53..cb6788c574 100644 --- a/examples/api/lib/cupertino/segmented_control/cupertino_segmented_control.0.dart +++ b/examples/api/lib/cupertino/segmented_control/cupertino_segmented_control.0.dart @@ -17,7 +17,7 @@ Map skyColors = { void main() => runApp(const SegmentedControlApp()); class SegmentedControlApp extends StatelessWidget { - const SegmentedControlApp({Key? key}) : super(key: key); + const SegmentedControlApp({super.key}); @override Widget build(BuildContext context) { @@ -29,7 +29,7 @@ class SegmentedControlApp extends StatelessWidget { } class SegmentedControlExample extends StatefulWidget { - const SegmentedControlExample({Key? key}) : super(key: key); + const SegmentedControlExample({super.key}); @override State createState() => _SegmentedControlExampleState(); diff --git a/examples/api/lib/cupertino/segmented_control/cupertino_sliding_segmented_control.0.dart b/examples/api/lib/cupertino/segmented_control/cupertino_sliding_segmented_control.0.dart index 085be031d8..4405cb4e36 100644 --- a/examples/api/lib/cupertino/segmented_control/cupertino_sliding_segmented_control.0.dart +++ b/examples/api/lib/cupertino/segmented_control/cupertino_sliding_segmented_control.0.dart @@ -17,7 +17,7 @@ Map skyColors = { void main() => runApp(const SegmentedControlApp()); class SegmentedControlApp extends StatelessWidget { - const SegmentedControlApp({Key? key}) : super(key: key); + const SegmentedControlApp({super.key}); @override Widget build(BuildContext context) { @@ -29,7 +29,7 @@ class SegmentedControlApp extends StatelessWidget { } class SegmentedControlExample extends StatefulWidget { - const SegmentedControlExample({Key? key}) : super(key: key); + const SegmentedControlExample({super.key}); @override State createState() => _SegmentedControlExampleState(); diff --git a/examples/api/lib/cupertino/slider/cupertino_slider.0.dart b/examples/api/lib/cupertino/slider/cupertino_slider.0.dart index e95dc7beb3..e5eac97f77 100644 --- a/examples/api/lib/cupertino/slider/cupertino_slider.0.dart +++ b/examples/api/lib/cupertino/slider/cupertino_slider.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const CupertinoSliderApp()); class CupertinoSliderApp extends StatelessWidget { - const CupertinoSliderApp({Key? key}) : super(key: key); + const CupertinoSliderApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class CupertinoSliderApp extends StatelessWidget { } class CupertinoSliderExample extends StatefulWidget { - const CupertinoSliderExample({Key? key}) : super(key: key); + const CupertinoSliderExample({super.key}); @override State createState() => _CupertinoSliderExampleState(); diff --git a/examples/api/lib/cupertino/switch/cupertino_switch.0.dart b/examples/api/lib/cupertino/switch/cupertino_switch.0.dart index 9323b37bbf..65bf7cb447 100644 --- a/examples/api/lib/cupertino/switch/cupertino_switch.0.dart +++ b/examples/api/lib/cupertino/switch/cupertino_switch.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const CupertinoSwitchApp()); class CupertinoSwitchApp extends StatelessWidget { - const CupertinoSwitchApp({Key? key}) : super(key: key); + const CupertinoSwitchApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class CupertinoSwitchApp extends StatelessWidget { } class CupertinoSwitchExample extends StatefulWidget { - const CupertinoSwitchExample({Key? key}) : super(key: key); + const CupertinoSwitchExample({super.key}); @override State createState() => _CupertinoSwitchExampleState(); diff --git a/examples/api/lib/cupertino/tab_scaffold/cupertino_tab_controller.0.dart b/examples/api/lib/cupertino/tab_scaffold/cupertino_tab_controller.0.dart index e0a5abd35b..9cb6e91851 100644 --- a/examples/api/lib/cupertino/tab_scaffold/cupertino_tab_controller.0.dart +++ b/examples/api/lib/cupertino/tab_scaffold/cupertino_tab_controller.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const TabControllerApp()); class TabControllerApp extends StatelessWidget { - const TabControllerApp({Key? key}) : super(key: key); + const TabControllerApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class TabControllerApp extends StatelessWidget { } class TabControllerExample extends StatefulWidget { - const TabControllerExample({Key? key}) : super(key: key); + const TabControllerExample({super.key}); @override State createState() => _TabControllerExampleState(); diff --git a/examples/api/lib/cupertino/tab_scaffold/cupertino_tab_scaffold.0.dart b/examples/api/lib/cupertino/tab_scaffold/cupertino_tab_scaffold.0.dart index d8bf2c57fd..a78024d250 100644 --- a/examples/api/lib/cupertino/tab_scaffold/cupertino_tab_scaffold.0.dart +++ b/examples/api/lib/cupertino/tab_scaffold/cupertino_tab_scaffold.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const TabScaffoldApp()); class TabScaffoldApp extends StatelessWidget { - const TabScaffoldApp({Key? key}) : super(key: key); + const TabScaffoldApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class TabScaffoldApp extends StatelessWidget { } class TabScaffoldExample extends StatefulWidget { - const TabScaffoldExample({Key? key}) : super(key: key); + const TabScaffoldExample({super.key}); @override State createState() => _TabScaffoldExampleState(); diff --git a/examples/api/lib/cupertino/text_field/cupertino_text_field.0.dart b/examples/api/lib/cupertino/text_field/cupertino_text_field.0.dart index 12054d3d15..4572cd15c1 100644 --- a/examples/api/lib/cupertino/text_field/cupertino_text_field.0.dart +++ b/examples/api/lib/cupertino/text_field/cupertino_text_field.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const CupertinoTextFieldApp()); class CupertinoTextFieldApp extends StatelessWidget { - const CupertinoTextFieldApp({Key? key}) : super(key: key); + const CupertinoTextFieldApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class CupertinoTextFieldApp extends StatelessWidget { } class CupertinoTextFieldExample extends StatefulWidget { - const CupertinoTextFieldExample({Key? key}) : super(key: key); + const CupertinoTextFieldExample({super.key}); @override State createState() => _CupertinoTextFieldExampleState(); diff --git a/examples/api/lib/cupertino/text_form_field_row/cupertino_text_form_field_row.1.dart b/examples/api/lib/cupertino/text_form_field_row/cupertino_text_form_field_row.1.dart index 1bedcd3c40..d0051bd0ec 100644 --- a/examples/api/lib/cupertino/text_form_field_row/cupertino_text_form_field_row.1.dart +++ b/examples/api/lib/cupertino/text_form_field_row/cupertino_text_form_field_row.1.dart @@ -9,7 +9,7 @@ import 'package:flutter/cupertino.dart'; void main() => runApp(const FormSectionApp()); class FormSectionApp extends StatelessWidget { - const FormSectionApp({Key? key}) : super(key: key); + const FormSectionApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class FormSectionApp extends StatelessWidget { } class FromSectionExample extends StatelessWidget { - const FromSectionExample({Key? key}) : super(key: key); + const FromSectionExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/foundation/change_notifier/change_notifier.0.dart b/examples/api/lib/foundation/change_notifier/change_notifier.0.dart index 2801131833..86bcc21e92 100644 --- a/examples/api/lib/foundation/change_notifier/change_notifier.0.dart +++ b/examples/api/lib/foundation/change_notifier/change_notifier.0.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; class CounterBody extends StatelessWidget { - const CounterBody({Key? key, required this.counterValueNotifier}) : super(key: key); + const CounterBody({super.key, required this.counterValueNotifier}); final ValueNotifier counterValueNotifier; @@ -36,7 +36,7 @@ class CounterBody extends StatelessWidget { } class MyApp extends StatefulWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override State createState() => _MyAppState(); diff --git a/examples/api/lib/gestures/pointer_signal_resolver/pointer_signal_resolver.0.dart b/examples/api/lib/gestures/pointer_signal_resolver/pointer_signal_resolver.0.dart index 8a2a791a0d..75287dbff2 100644 --- a/examples/api/lib/gestures/pointer_signal_resolver/pointer_signal_resolver.0.dart +++ b/examples/api/lib/gestures/pointer_signal_resolver/pointer_signal_resolver.0.dart @@ -11,7 +11,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}); static const String _title = 'Flutter Code Sample'; @@ -26,11 +26,11 @@ class MyApp extends StatelessWidget { class ColorChanger extends StatefulWidget { const ColorChanger({ - Key? key, + super.key, required this.initialColor, required this.useResolver, this.child, - }) : super(key: key); + }); final HSVColor initialColor; final bool useResolver; @@ -86,7 +86,7 @@ class _ColorChangerState extends State { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/about/about_list_tile.0.dart b/examples/api/lib/material/about/about_list_tile.0.dart index 663eb163b8..5c21fd0011 100644 --- a/examples/api/lib/material/about/about_list_tile.0.dart +++ b/examples/api/lib/material/about/about_list_tile.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/app_bar/app_bar.0.dart b/examples/api/lib/material/app_bar/app_bar.0.dart index 1d436c7313..c58bc4d2be 100644 --- a/examples/api/lib/material/app_bar/app_bar.0.dart +++ b/examples/api/lib/material/app_bar/app_bar.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/app_bar/app_bar.1.dart b/examples/api/lib/material/app_bar/app_bar.1.dart index c5ddf6e393..f94b07875b 100644 --- a/examples/api/lib/material/app_bar/app_bar.1.dart +++ b/examples/api/lib/material/app_bar/app_bar.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/app_bar/sliver_app_bar.1.dart b/examples/api/lib/material/app_bar/sliver_app_bar.1.dart index 59eccf0f52..72895d256a 100644 --- a/examples/api/lib/material/app_bar/sliver_app_bar.1.dart +++ b/examples/api/lib/material/app_bar/sliver_app_bar.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/autocomplete/autocomplete.0.dart b/examples/api/lib/material/autocomplete/autocomplete.0.dart index 0fdcd98cf5..31eca943b6 100644 --- a/examples/api/lib/material/autocomplete/autocomplete.0.dart +++ b/examples/api/lib/material/autocomplete/autocomplete.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const AutocompleteExampleApp()); class AutocompleteExampleApp extends StatelessWidget { - const AutocompleteExampleApp({Key? key}) : super(key: key); + const AutocompleteExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -27,7 +27,7 @@ class AutocompleteExampleApp extends StatelessWidget { } class AutocompleteBasicExample extends StatelessWidget { - const AutocompleteBasicExample({Key? key}) : super(key: key); + const AutocompleteBasicExample({super.key}); static const List _kOptions = [ 'aardvark', diff --git a/examples/api/lib/material/autocomplete/autocomplete.1.dart b/examples/api/lib/material/autocomplete/autocomplete.1.dart index d6031f4a8f..1af404bce2 100644 --- a/examples/api/lib/material/autocomplete/autocomplete.1.dart +++ b/examples/api/lib/material/autocomplete/autocomplete.1.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const AutocompleteExampleApp()); class AutocompleteExampleApp extends StatelessWidget { - const AutocompleteExampleApp({Key? key}) : super(key: key); + const AutocompleteExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -54,7 +54,7 @@ class User { } class AutocompleteBasicUserExample extends StatelessWidget { - const AutocompleteBasicUserExample({Key? key}) : super(key: key); + const AutocompleteBasicUserExample({super.key}); static const List _userOptions = [ User(name: 'Alice', email: 'alice@example.com'), diff --git a/examples/api/lib/material/banner/material_banner.0.dart b/examples/api/lib/material/banner/material_banner.0.dart index 9ad83ac999..3d19206117 100644 --- a/examples/api/lib/material/banner/material_banner.0.dart +++ b/examples/api/lib/material/banner/material_banner.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/banner/material_banner.1.dart b/examples/api/lib/material/banner/material_banner.1.dart index 10cc4d0e98..6ec7e1c725 100644 --- a/examples/api/lib/material/banner/material_banner.1.dart +++ b/examples/api/lib/material/banner/material_banner.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart b/examples/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart index e72b9d023e..169dd340d5 100644 --- a/examples/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart +++ b/examples/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart @@ -11,7 +11,7 @@ void main() { } class BottomAppBarDemo extends StatefulWidget { - const BottomAppBarDemo({Key? key}) : super(key: key); + const BottomAppBarDemo({super.key}); @override State createState() => _BottomAppBarDemoState(); diff --git a/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart b/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart index 629249aa61..bc8e1ba61c 100644 --- a/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart +++ b/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.1.dart b/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.1.dart index c7d3662db3..df377f80c1 100644 --- a/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.1.dart +++ b/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart b/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart index e7b7702521..e8a09fe9e8 100644 --- a/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart +++ b/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/button_style/button_style.0.dart b/examples/api/lib/material/button_style/button_style.0.dart index bff8602c6a..571b33952a 100644 --- a/examples/api/lib/material/button_style/button_style.0.dart +++ b/examples/api/lib/material/button_style/button_style.0.dart @@ -11,7 +11,7 @@ void main() { } class ButtonApp extends StatelessWidget { - const ButtonApp({Key? key}) : super(key: key); + const ButtonApp({super.key}); @override Widget build(BuildContext context) { @@ -26,7 +26,7 @@ class ButtonApp extends StatelessWidget { } class ButtonTypesExample extends StatelessWidget { - const ButtonTypesExample({Key? key}) : super(key: key); + const ButtonTypesExample({super.key}); @override Widget build(BuildContext context) { @@ -45,7 +45,7 @@ class ButtonTypesExample extends StatelessWidget { } class ButtonTypesGroup extends StatelessWidget { - const ButtonTypesGroup({ Key? key, required this.enabled }) : super(key: key); + const ButtonTypesGroup({ super.key, required this.enabled }); final bool enabled; diff --git a/examples/api/lib/material/card/card.0.dart b/examples/api/lib/material/card/card.0.dart index 96ef832790..8d37dcc5b7 100644 --- a/examples/api/lib/material/card/card.0.dart +++ b/examples/api/lib/material/card/card.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/card/card.1.dart b/examples/api/lib/material/card/card.1.dart index 3eb4457afd..9e9c3d711d 100644 --- a/examples/api/lib/material/card/card.1.dart +++ b/examples/api/lib/material/card/card.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/card/card.2.dart b/examples/api/lib/material/card/card.2.dart index 174d191705..85cc61a2fb 100644 --- a/examples/api/lib/material/card/card.2.dart +++ b/examples/api/lib/material/card/card.2.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() { runApp(const CardExamplesApp()); } class CardExamplesApp extends StatelessWidget { - const CardExamplesApp({Key? key}) : super(key: key); + const CardExamplesApp({super.key}); @override Widget build(BuildContext context) { @@ -38,7 +38,7 @@ class CardExamplesApp extends StatelessWidget { /// /// https://m3.material.io/components/cards/specs#a012d40d-7a5c-4b07-8740-491dec79d58b class ElevatedCardExample extends StatelessWidget { - const ElevatedCardExample({ Key? key }) : super(key: key); + const ElevatedCardExample({ super.key }); @override Widget build(BuildContext context) { @@ -61,7 +61,7 @@ class ElevatedCardExample extends StatelessWidget { /// /// https://m3.material.io/components/cards/specs#0f55bf62-edf2-4619-b00d-b9ed462f2c5a class FilledCardExample extends StatelessWidget { - const FilledCardExample({ Key? key }) : super(key: key); + const FilledCardExample({ super.key }); @override Widget build(BuildContext context) { @@ -86,7 +86,7 @@ class FilledCardExample extends StatelessWidget { /// /// https://m3.material.io/components/cards/specs#0f55bf62-edf2-4619-b00d-b9ed462f2c5a class OutlinedCardExample extends StatelessWidget { - const OutlinedCardExample({ Key? key }) : super(key: key); + const OutlinedCardExample({ super.key }); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/checkbox/checkbox.0.dart b/examples/api/lib/material/checkbox/checkbox.0.dart index 134fd9e642..54f8521dd5 100644 --- a/examples/api/lib/material/checkbox/checkbox.0.dart +++ b/examples/api/lib/material/checkbox/checkbox.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.0.dart b/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.0.dart index b1e15de6a7..ba23466c9e 100644 --- a/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.0.dart +++ b/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/scheduler.dart' show timeDilation; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -29,7 +29,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.1.dart b/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.1.dart index 470d21fe39..64084bd388 100644 --- a/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.1.dart +++ b/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.1.dart @@ -11,7 +11,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}); static const String _title = 'Flutter Code Sample'; @@ -31,12 +31,12 @@ class MyApp extends StatelessWidget { class LinkedLabelCheckbox extends StatelessWidget { const LinkedLabelCheckbox({ - Key? key, + super.key, required this.label, required this.padding, required this.value, required this.onChanged, - }) : super(key: key); + }); final String label; final EdgeInsets padding; @@ -77,7 +77,7 @@ class LinkedLabelCheckbox extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.2.dart b/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.2.dart index c8a966fb0c..3b1abdfae9 100644 --- a/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.2.dart +++ b/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.2.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}); static const String _title = 'Flutter Code Sample'; @@ -29,12 +29,12 @@ class MyApp extends StatelessWidget { class LabeledCheckbox extends StatelessWidget { const LabeledCheckbox({ - Key? key, + super.key, required this.label, required this.padding, required this.value, required this.onChanged, - }) : super(key: key); + }); final String label; final EdgeInsets padding; @@ -66,7 +66,7 @@ class LabeledCheckbox extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/chip/deletable_chip_attributes.on_deleted.0.dart b/examples/api/lib/material/chip/deletable_chip_attributes.on_deleted.0.dart index 757042694f..44e505e498 100644 --- a/examples/api/lib/material/chip/deletable_chip_attributes.on_deleted.0.dart +++ b/examples/api/lib/material/chip/deletable_chip_attributes.on_deleted.0.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}); static const String _title = 'Flutter Code Sample'; @@ -34,7 +34,7 @@ class Actor { } class CastList extends StatefulWidget { - const CastList({Key? key}) : super(key: key); + const CastList({super.key}); @override State createState() => CastListState(); @@ -76,7 +76,7 @@ class CastListState extends State { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/data_table/data_table.0.dart b/examples/api/lib/material/data_table/data_table.0.dart index 5d110c8fbf..7b75d17ca4 100644 --- a/examples/api/lib/material/data_table/data_table.0.dart +++ b/examples/api/lib/material/data_table/data_table.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/data_table/data_table.1.dart b/examples/api/lib/material/data_table/data_table.1.dart index 381fd85641..4ec80e6d23 100644 --- a/examples/api/lib/material/data_table/data_table.1.dart +++ b/examples/api/lib/material/data_table/data_table.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/date_picker/show_date_picker.0.dart b/examples/api/lib/material/date_picker/show_date_picker.0.dart index c524affe2c..3d1ec9de5b 100644 --- a/examples/api/lib/material/date_picker/show_date_picker.0.dart +++ b/examples/api/lib/material/date_picker/show_date_picker.0.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}); static const String _title = 'Flutter Code Sample'; @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key, this.restorationId}) : super(key: key); + const MyStatefulWidget({super.key, this.restorationId}); final String? restorationId; diff --git a/examples/api/lib/material/date_picker/show_date_range_picker.0.dart b/examples/api/lib/material/date_picker/show_date_range_picker.0.dart index 47d77876ce..f4631be209 100644 --- a/examples/api/lib/material/date_picker/show_date_range_picker.0.dart +++ b/examples/api/lib/material/date_picker/show_date_range_picker.0.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}); static const String _title = 'Flutter Code Sample'; @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key, this.restorationId}) : super(key: key); + const MyStatefulWidget({super.key, this.restorationId}); final String? restorationId; diff --git a/examples/api/lib/material/dialog/alert_dialog.0.dart b/examples/api/lib/material/dialog/alert_dialog.0.dart index 4d44b911a2..afe737bb34 100644 --- a/examples/api/lib/material/dialog/alert_dialog.0.dart +++ b/examples/api/lib/material/dialog/alert_dialog.0.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}); @override Widget build(BuildContext context) { @@ -25,7 +25,7 @@ class MyApp extends StatelessWidget { } class DialogExample extends StatelessWidget { - const DialogExample({Key? key}) : super(key: key); + const DialogExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/dialog/alert_dialog.1.dart b/examples/api/lib/material/dialog/alert_dialog.1.dart index be7d5dfba0..3ce7e7e499 100644 --- a/examples/api/lib/material/dialog/alert_dialog.1.dart +++ b/examples/api/lib/material/dialog/alert_dialog.1.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}); @override Widget build(BuildContext context) { @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class DialogExample extends StatelessWidget { - const DialogExample({Key? key}) : super(key: key); + const DialogExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/dialog/show_dialog.0.dart b/examples/api/lib/material/dialog/show_dialog.0.dart index c124ec7f75..88ac3a780e 100644 --- a/examples/api/lib/material/dialog/show_dialog.0.dart +++ b/examples/api/lib/material/dialog/show_dialog.0.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}); @override Widget build(BuildContext context) { @@ -20,7 +20,7 @@ class MyApp extends StatelessWidget { } class DialogExample extends StatelessWidget { - const DialogExample({Key? key}) : super(key: key); + const DialogExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/dialog/show_dialog.1.dart b/examples/api/lib/material/dialog/show_dialog.1.dart index 2376b7791e..9e212bb7a5 100644 --- a/examples/api/lib/material/dialog/show_dialog.1.dart +++ b/examples/api/lib/material/dialog/show_dialog.1.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}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class MyApp extends StatelessWidget { } class DialogExample extends StatelessWidget { - const DialogExample({Key? key}) : super(key: key); + const DialogExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/dialog/show_dialog.2.dart b/examples/api/lib/material/dialog/show_dialog.2.dart index 849368c70a..054893485b 100644 --- a/examples/api/lib/material/dialog/show_dialog.2.dart +++ b/examples/api/lib/material/dialog/show_dialog.2.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}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class MyApp extends StatelessWidget { } class DialogExample extends StatelessWidget { - const DialogExample({Key? key}) : super(key: key); + const DialogExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/divider/divider.0.dart b/examples/api/lib/material/divider/divider.0.dart index bc1402bdf3..3c76370288 100644 --- a/examples/api/lib/material/divider/divider.0.dart +++ b/examples/api/lib/material/divider/divider.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/divider/vertical_divider.0.dart b/examples/api/lib/material/divider/vertical_divider.0.dart index 65a29b8988..8971c9745b 100644 --- a/examples/api/lib/material/divider/vertical_divider.0.dart +++ b/examples/api/lib/material/divider/vertical_divider.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/dropdown/dropdown_button.0.dart b/examples/api/lib/material/dropdown/dropdown_button.0.dart index 7f13776782..a90d5ccf43 100644 --- a/examples/api/lib/material/dropdown/dropdown_button.0.dart +++ b/examples/api/lib/material/dropdown/dropdown_button.0.dart @@ -11,7 +11,7 @@ const List list = ['One', 'Two', 'Three', 'Four']; void main() => runApp(const DropdownButtonApp()); class DropdownButtonApp extends StatelessWidget { - const DropdownButtonApp({Key? key}) : super(key: key); + const DropdownButtonApp({super.key}); @override Widget build(BuildContext context) { @@ -27,7 +27,7 @@ class DropdownButtonApp extends StatelessWidget { } class DropdownButtonExample extends StatefulWidget { - const DropdownButtonExample({Key? key}) : super(key: key); + const DropdownButtonExample({super.key}); @override State createState() => _DropdownButtonExampleState(); diff --git a/examples/api/lib/material/dropdown/dropdown_button.selected_item_builder.0.dart b/examples/api/lib/material/dropdown/dropdown_button.selected_item_builder.0.dart index c99ca58907..baf0176591 100644 --- a/examples/api/lib/material/dropdown/dropdown_button.selected_item_builder.0.dart +++ b/examples/api/lib/material/dropdown/dropdown_button.selected_item_builder.0.dart @@ -17,7 +17,7 @@ Map cities = { void main() => runApp(const DropdownButtonApp()); class DropdownButtonApp extends StatelessWidget { - const DropdownButtonApp({Key? key}) : super(key: key); + const DropdownButtonApp({super.key}); @override Widget build(BuildContext context) { @@ -31,7 +31,7 @@ class DropdownButtonApp extends StatelessWidget { } class DropdownButtonExample extends StatefulWidget { - const DropdownButtonExample({Key? key}) : super(key: key); + const DropdownButtonExample({super.key}); @override State createState() => _DropdownButtonExampleState(); diff --git a/examples/api/lib/material/dropdown/dropdown_button.style.0.dart b/examples/api/lib/material/dropdown/dropdown_button.style.0.dart index 55d1a9887b..9dc6557d4b 100644 --- a/examples/api/lib/material/dropdown/dropdown_button.style.0.dart +++ b/examples/api/lib/material/dropdown/dropdown_button.style.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const DropdownButtonApp()); class DropdownButtonApp extends StatelessWidget { - const DropdownButtonApp({Key? key}) : super(key: key); + const DropdownButtonApp({super.key}); @override Widget build(BuildContext context) { @@ -23,7 +23,7 @@ class DropdownButtonApp extends StatelessWidget { } class DropdownButtonExample extends StatefulWidget { - const DropdownButtonExample({Key? key}) : super(key: key); + const DropdownButtonExample({super.key}); @override State createState() => _DropdownButtonExampleState(); diff --git a/examples/api/lib/material/elevated_button/elevated_button.0.dart b/examples/api/lib/material/elevated_button/elevated_button.0.dart index a827d4d173..abe601f175 100644 --- a/examples/api/lib/material/elevated_button/elevated_button.0.dart +++ b/examples/api/lib/material/elevated_button/elevated_button.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/expansion_panel/expansion_panel_list.0.dart b/examples/api/lib/material/expansion_panel/expansion_panel_list.0.dart index 0cc5fd3c59..68381376a7 100644 --- a/examples/api/lib/material/expansion_panel/expansion_panel_list.0.dart +++ b/examples/api/lib/material/expansion_panel/expansion_panel_list.0.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}); static const String _title = 'Flutter Code Sample'; @@ -48,7 +48,7 @@ List generateItems(int numberOfItems) { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/expansion_panel/expansion_panel_list.expansion_panel_list_radio.0.dart b/examples/api/lib/material/expansion_panel/expansion_panel_list.expansion_panel_list_radio.0.dart index 5e295a7319..80e0a67d69 100644 --- a/examples/api/lib/material/expansion_panel/expansion_panel_list.expansion_panel_list_radio.0.dart +++ b/examples/api/lib/material/expansion_panel/expansion_panel_list.expansion_panel_list_radio.0.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}); static const String _title = 'Flutter Code Sample'; @@ -49,7 +49,7 @@ List generateItems(int numberOfItems) { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/expansion_tile/expansion_tile.0.dart b/examples/api/lib/material/expansion_tile/expansion_tile.0.dart index e49bdf7ad5..20dfa47de7 100644 --- a/examples/api/lib/material/expansion_tile/expansion_tile.0.dart +++ b/examples/api/lib/material/expansion_tile/expansion_tile.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/flexible_space_bar/flexible_space_bar.0.dart b/examples/api/lib/material/flexible_space_bar/flexible_space_bar.0.dart index 480ddfea49..e37be21baa 100644 --- a/examples/api/lib/material/flexible_space_bar/flexible_space_bar.0.dart +++ b/examples/api/lib/material/flexible_space_bar/flexible_space_bar.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const MaterialApp(home: MyApp())); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/floating_action_button/floating_action_button.0.dart b/examples/api/lib/material/floating_action_button/floating_action_button.0.dart index 05c19e43ef..d80e5e5d13 100644 --- a/examples/api/lib/material/floating_action_button/floating_action_button.0.dart +++ b/examples/api/lib/material/floating_action_button/floating_action_button.0.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}); @override Widget build(BuildContext context) { @@ -20,7 +20,7 @@ class MyApp extends StatelessWidget { } class FabExample extends StatelessWidget { - const FabExample({Key? key}) : super(key: key); + const FabExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/floating_action_button/floating_action_button.1.dart b/examples/api/lib/material/floating_action_button/floating_action_button.1.dart index df5a12da65..525cd4e4eb 100644 --- a/examples/api/lib/material/floating_action_button/floating_action_button.1.dart +++ b/examples/api/lib/material/floating_action_button/floating_action_button.1.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}); @override Widget build(BuildContext context) { @@ -20,7 +20,7 @@ class MyApp extends StatelessWidget { } class FabExample extends StatelessWidget { - const FabExample({Key? key}) : super(key: key); + const FabExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/floating_action_button/floating_action_button.2.dart b/examples/api/lib/material/floating_action_button/floating_action_button.2.dart index 5d517092c4..cd39e3992e 100644 --- a/examples/api/lib/material/floating_action_button/floating_action_button.2.dart +++ b/examples/api/lib/material/floating_action_button/floating_action_button.2.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}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class MyApp extends StatelessWidget { } class FabExample extends StatelessWidget { - const FabExample({Key? key}) : super(key: key); + const FabExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/floating_action_button/floating_action_button.3.dart b/examples/api/lib/material/floating_action_button/floating_action_button.3.dart index 9c2eb5f0dc..0001ad7938 100644 --- a/examples/api/lib/material/floating_action_button/floating_action_button.3.dart +++ b/examples/api/lib/material/floating_action_button/floating_action_button.3.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}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class MyApp extends StatelessWidget { } class FabExample extends StatelessWidget { - const FabExample({Key? key}) : super(key: key); + const FabExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/floating_action_button_location/standard_fab_location.0.dart b/examples/api/lib/material/floating_action_button_location/standard_fab_location.0.dart index a7dd2548a1..67e68639a2 100644 --- a/examples/api/lib/material/floating_action_button_location/standard_fab_location.0.dart +++ b/examples/api/lib/material/floating_action_button_location/standard_fab_location.0.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}); static const String _title = 'Flutter Code Sample'; @@ -35,7 +35,7 @@ class AlmostEndFloatFabLocation extends StandardFabLocation } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/icon_button/icon_button.0.dart b/examples/api/lib/material/icon_button/icon_button.0.dart index 2c62fa10d4..6475602223 100644 --- a/examples/api/lib/material/icon_button/icon_button.0.dart +++ b/examples/api/lib/material/icon_button/icon_button.0.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}); static const String _title = 'Flutter Code Sample'; @@ -30,7 +30,7 @@ class MyApp extends StatelessWidget { double _volume = 0.0; class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/icon_button/icon_button.1.dart b/examples/api/lib/material/icon_button/icon_button.1.dart index f88848a926..71c216aa2c 100644 --- a/examples/api/lib/material/icon_button/icon_button.1.dart +++ b/examples/api/lib/material/icon_button/icon_button.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override @override diff --git a/examples/api/lib/material/ink/ink.image_clip.0.dart b/examples/api/lib/material/ink/ink.image_clip.0.dart index 1914a0dc2f..b6fb0992f3 100644 --- a/examples/api/lib/material/ink/ink.image_clip.0.dart +++ b/examples/api/lib/material/ink/ink.image_clip.0.dart @@ -21,7 +21,7 @@ void main() { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key, required this.image}) : super(key: key); + const MyStatelessWidget({super.key, required this.image}); final ImageProvider image; diff --git a/examples/api/lib/material/ink/ink.image_clip.1.dart b/examples/api/lib/material/ink/ink.image_clip.1.dart index 2cb0bf8914..2338d9c443 100644 --- a/examples/api/lib/material/ink/ink.image_clip.1.dart +++ b/examples/api/lib/material/ink/ink.image_clip.1.dart @@ -21,7 +21,7 @@ void main() { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key, required this.image}) : super(key: key); + const MyStatelessWidget({super.key, required this.image}); final ImageProvider image; diff --git a/examples/api/lib/material/ink_well/ink_well.0.dart b/examples/api/lib/material/ink_well/ink_well.0.dart index 1bc2d28089..8959370a9b 100644 --- a/examples/api/lib/material/ink_well/ink_well.0.dart +++ b/examples/api/lib/material/ink_well/ink_well.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/input_decorator/input_decoration.0.dart b/examples/api/lib/material/input_decorator/input_decoration.0.dart index 1fbe1f9cd6..11cb26f0d8 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.0.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.1.dart b/examples/api/lib/material/input_decorator/input_decoration.1.dart index c461afccb4..5c56ca460e 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.1.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.2.dart b/examples/api/lib/material/input_decorator/input_decoration.2.dart index f2d025a65e..011d76542b 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.2.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.2.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.3.dart b/examples/api/lib/material/input_decorator/input_decoration.3.dart index 6098556300..d316144549 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.3.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.3.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.dart b/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.dart index 532b0d7171..af6df22654 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class InputDecoratorExample extends StatelessWidget { - const InputDecoratorExample({Key? key}) : super(key: key); + const InputDecoratorExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.label.0.dart b/examples/api/lib/material/input_decorator/input_decoration.label.0.dart index f731640b7d..ab7caff859 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.label.0.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.label.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.label_style_error.0.dart b/examples/api/lib/material/input_decorator/input_decoration.label_style_error.0.dart index c615bf04d6..cb4fd6c933 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.label_style_error.0.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.label_style_error.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class InputDecoratorExample extends StatelessWidget { - const InputDecoratorExample({Key? key}) : super(key: key); + const InputDecoratorExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.material_state.0.dart b/examples/api/lib/material/input_decorator/input_decoration.material_state.0.dart index f21e6a5de1..d38e99ad14 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.material_state.0.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.material_state.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.material_state.1.dart b/examples/api/lib/material/input_decorator/input_decoration.material_state.1.dart index 9aab91153c..650f1e2a8a 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.material_state.1.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.material_state.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.prefix_icon.0.dart b/examples/api/lib/material/input_decorator/input_decoration.prefix_icon.0.dart index b3750661e3..d400f6d71f 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.prefix_icon.0.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.prefix_icon.0.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}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class MyApp extends StatelessWidget { } class InputDecoratorExample extends StatelessWidget { - const InputDecoratorExample({Key? key}) : super(key: key); + const InputDecoratorExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.prefix_icon_constraints.0.dart b/examples/api/lib/material/input_decorator/input_decoration.prefix_icon_constraints.0.dart index 994dde3713..067a4df0af 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.prefix_icon_constraints.0.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.prefix_icon_constraints.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.suffix_icon.0.dart b/examples/api/lib/material/input_decorator/input_decoration.suffix_icon.0.dart index 0ae5f2f08f..627d3c6924 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.suffix_icon.0.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.suffix_icon.0.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}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class MyApp extends StatelessWidget { } class InputDecoratorExample extends StatelessWidget { - const InputDecoratorExample({Key? key}) : super(key: key); + const InputDecoratorExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/input_decorator/input_decoration.suffix_icon_constraints.0.dart b/examples/api/lib/material/input_decorator/input_decoration.suffix_icon_constraints.0.dart index 795df5ba1d..eb8270bdb4 100644 --- a/examples/api/lib/material/input_decorator/input_decoration.suffix_icon_constraints.0.dart +++ b/examples/api/lib/material/input_decorator/input_decoration.suffix_icon_constraints.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/list_tile/list_tile.4.dart b/examples/api/lib/material/list_tile/list_tile.4.dart index 16468fa4da..238b347c96 100644 --- a/examples/api/lib/material/list_tile/list_tile.4.dart +++ b/examples/api/lib/material/list_tile/list_tile.4.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}); static const String _title = 'Flutter Code Sample'; @@ -27,12 +27,12 @@ class MyApp extends StatelessWidget { class CustomListItem extends StatelessWidget { const CustomListItem({ - Key? key, + super.key, required this.thumbnail, required this.title, required this.user, required this.viewCount, - }) : super(key: key); + }); final Widget thumbnail; final String title; @@ -70,11 +70,10 @@ class CustomListItem extends StatelessWidget { class _VideoDescription extends StatelessWidget { const _VideoDescription({ - Key? key, required this.title, required this.user, required this.viewCount, - }) : super(key: key); + }); final String title; final String user; @@ -111,7 +110,7 @@ class _VideoDescription extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/list_tile/list_tile.5.dart b/examples/api/lib/material/list_tile/list_tile.5.dart index 4aff57a23c..01c60015a8 100644 --- a/examples/api/lib/material/list_tile/list_tile.5.dart +++ b/examples/api/lib/material/list_tile/list_tile.5.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}); static const String _title = 'Flutter Code Sample'; @@ -27,13 +27,12 @@ class MyApp extends StatelessWidget { class _ArticleDescription extends StatelessWidget { const _ArticleDescription({ - Key? key, required this.title, required this.subtitle, required this.author, required this.publishDate, required this.readDuration, - }) : super(key: key); + }); final String title; final String subtitle; @@ -100,14 +99,14 @@ class _ArticleDescription extends StatelessWidget { class CustomListItemTwo extends StatelessWidget { const CustomListItemTwo({ - Key? key, + super.key, required this.thumbnail, required this.title, required this.subtitle, required this.author, required this.publishDate, required this.readDuration, - }) : super(key: key); + }); final Widget thumbnail; final String title; @@ -149,7 +148,7 @@ class CustomListItemTwo extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/list_tile/list_tile.selected.0.dart b/examples/api/lib/material/list_tile/list_tile.selected.0.dart index 79a4996762..413197c8e4 100644 --- a/examples/api/lib/material/list_tile/list_tile.selected.0.dart +++ b/examples/api/lib/material/list_tile/list_tile.selected.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/material_state/material_state_border_side.0.dart b/examples/api/lib/material/material_state/material_state_border_side.0.dart index 8a65691742..6a27f4d155 100644 --- a/examples/api/lib/material/material_state/material_state_border_side.0.dart +++ b/examples/api/lib/material/material_state/material_state_border_side.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/material_state/material_state_mouse_cursor.0.dart b/examples/api/lib/material/material_state/material_state_mouse_cursor.0.dart index af71248643..a3e05e5491 100644 --- a/examples/api/lib/material/material_state/material_state_mouse_cursor.0.dart +++ b/examples/api/lib/material/material_state/material_state_mouse_cursor.0.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}); static const String _title = 'Flutter Code Sample'; @@ -41,7 +41,7 @@ class ListTileCursor extends MaterialStateMouseCursor { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/material_state/material_state_outlined_border.0.dart b/examples/api/lib/material/material_state/material_state_outlined_border.0.dart index f6287e0bb7..76036266b4 100644 --- a/examples/api/lib/material/material_state/material_state_outlined_border.0.dart +++ b/examples/api/lib/material/material_state/material_state_outlined_border.0.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}); static const String _title = 'Flutter Code Sample'; @@ -34,7 +34,7 @@ class SelectedBorder extends RoundedRectangleBorder } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/material_state/material_state_property.0.dart b/examples/api/lib/material/material_state/material_state_property.0.dart index 1f189978a9..b277f6e57b 100644 --- a/examples/api/lib/material/material_state/material_state_property.0.dart +++ b/examples/api/lib/material/material_state/material_state_property.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/navigation_bar/navigation_bar.0.dart b/examples/api/lib/material/navigation_bar/navigation_bar.0.dart index 4ca40385e2..2b0ac12519 100644 --- a/examples/api/lib/material/navigation_bar/navigation_bar.0.dart +++ b/examples/api/lib/material/navigation_bar/navigation_bar.0.dart @@ -15,7 +15,7 @@ class Destination { } class RootPage extends StatelessWidget { - const RootPage({ Key? key, required this.destination }) : super(key: key); + const RootPage({ super.key, required this.destination }); final Destination destination; @@ -117,7 +117,7 @@ class RootPage extends StatelessWidget { } class ListPage extends StatelessWidget { - const ListPage({ Key? key, required this.destination }) : super(key: key); + const ListPage({ super.key, required this.destination }); final Destination destination; @@ -161,7 +161,7 @@ class ListPage extends StatelessWidget { } class TextPage extends StatefulWidget { - const TextPage({ Key? key, required this.destination }) : super(key: key); + const TextPage({ super.key, required this.destination }); final Destination destination; @@ -217,10 +217,10 @@ class _TextPageState extends State { class DestinationView extends StatefulWidget { const DestinationView({ - Key? key, + super.key, required this.destination, required this.navigatorKey, - }) : super(key: key); + }); final Destination destination; final Key navigatorKey; @@ -256,7 +256,7 @@ class _DestinationViewState extends State { } class Home extends StatefulWidget { - const Home({ Key? key }) : super(key: key); + const Home({ super.key }); @override State createState() => _HomeState(); diff --git a/examples/api/lib/material/navigation_bar/navigation_bar.dart b/examples/api/lib/material/navigation_bar/navigation_bar.dart index 98651df673..0b93c9349c 100644 --- a/examples/api/lib/material/navigation_bar/navigation_bar.dart +++ b/examples/api/lib/material/navigation_bar/navigation_bar.dart @@ -11,7 +11,7 @@ void main() { } 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 NavigationExample extends StatefulWidget { - const NavigationExample({Key? key}) : super(key: key); + const NavigationExample({super.key}); @override State createState() => _NavigationExampleState(); diff --git a/examples/api/lib/material/navigation_rail/navigation_rail.0.dart b/examples/api/lib/material/navigation_rail/navigation_rail.0.dart index 0dabb14dff..b4a920d086 100644 --- a/examples/api/lib/material/navigation_rail/navigation_rail.0.dart +++ b/examples/api/lib/material/navigation_rail/navigation_rail.0.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}); @override Widget build(BuildContext context) { @@ -20,7 +20,7 @@ class MyApp extends StatelessWidget { } class NavRailExample extends StatefulWidget { - const NavRailExample({Key? key}) : super(key: key); + const NavRailExample({super.key}); @override State createState() => _NavRailExampleState(); diff --git a/examples/api/lib/material/navigation_rail/navigation_rail.1.dart b/examples/api/lib/material/navigation_rail/navigation_rail.1.dart index c3b886fecc..d5180955e6 100644 --- a/examples/api/lib/material/navigation_rail/navigation_rail.1.dart +++ b/examples/api/lib/material/navigation_rail/navigation_rail.1.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}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class MyApp extends StatelessWidget { } class NavRailExample extends StatefulWidget { - const NavRailExample({Key? key}) : super(key: key); + const NavRailExample({super.key}); @override State createState() => _NavRailExampleState(); diff --git a/examples/api/lib/material/navigation_rail/navigation_rail.extended_animation.0.dart b/examples/api/lib/material/navigation_rail/navigation_rail.extended_animation.0.dart index e0583df488..7a5a237c80 100644 --- a/examples/api/lib/material/navigation_rail/navigation_rail.extended_animation.0.dart +++ b/examples/api/lib/material/navigation_rail/navigation_rail.extended_animation.0.dart @@ -11,7 +11,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) { @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget { } class MyNavigationRail extends StatefulWidget { - const MyNavigationRail({Key? key}) : super(key: key); + const MyNavigationRail({super.key}); @override State createState() => _MyNavigationRailState(); @@ -90,7 +90,7 @@ class _MyNavigationRailState extends State { } class MyNavigationRailFab extends StatelessWidget { - const MyNavigationRailFab({Key? key, this.onPressed}) : super(key: key); + const MyNavigationRailFab({super.key, this.onPressed}); final VoidCallback? onPressed; diff --git a/examples/api/lib/material/outlined_button/outlined_button.0.dart b/examples/api/lib/material/outlined_button/outlined_button.0.dart index 887c5769da..b21d974679 100644 --- a/examples/api/lib/material/outlined_button/outlined_button.0.dart +++ b/examples/api/lib/material/outlined_button/outlined_button.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/platform_menu_bar/platform_menu_bar.0.dart b/examples/api/lib/material/platform_menu_bar/platform_menu_bar.0.dart index 88a7308456..8d988439e9 100644 --- a/examples/api/lib/material/platform_menu_bar/platform_menu_bar.0.dart +++ b/examples/api/lib/material/platform_menu_bar/platform_menu_bar.0.dart @@ -19,7 +19,7 @@ enum MenuSelection { } class SampleApp extends StatelessWidget { - const SampleApp({Key? key}) : super(key: key); + const SampleApp({super.key}); @override Widget build(BuildContext context) { @@ -30,7 +30,7 @@ class SampleApp extends StatelessWidget { } class MyMenuBarApp extends StatefulWidget { - const MyMenuBarApp({Key? key}) : super(key: key); + const MyMenuBarApp({super.key}); @override State createState() => _MyMenuBarAppState(); diff --git a/examples/api/lib/material/popupmenu/popupmenu.0.dart b/examples/api/lib/material/popupmenu/popupmenu.0.dart index 76323dfb5b..7aa1645f6a 100644 --- a/examples/api/lib/material/popupmenu/popupmenu.0.dart +++ b/examples/api/lib/material/popupmenu/popupmenu.0.dart @@ -12,7 +12,7 @@ enum Menu { itemOne, itemTwo, itemThree, itemFour } void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart b/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart index 5b8082a74b..ba9211bc96 100644 --- a/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart +++ b/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/progress_indicator/linear_progress_indicator.0.dart b/examples/api/lib/material/progress_indicator/linear_progress_indicator.0.dart index ab70d74d8a..db75611e94 100644 --- a/examples/api/lib/material/progress_indicator/linear_progress_indicator.0.dart +++ b/examples/api/lib/material/progress_indicator/linear_progress_indicator.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/radio/radio.0.dart b/examples/api/lib/material/radio/radio.0.dart index ea54405389..48696dfc7a 100644 --- a/examples/api/lib/material/radio/radio.0.dart +++ b/examples/api/lib/material/radio/radio.0.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}); static const String _title = 'Flutter Code Sample'; @@ -30,7 +30,7 @@ class MyApp extends StatelessWidget { enum SingingCharacter { lafayette, jefferson } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/radio/radio.toggleable.0.dart b/examples/api/lib/material/radio/radio.toggleable.0.dart index c2263b9ac3..441eba9735 100644 --- a/examples/api/lib/material/radio/radio.toggleable.0.dart +++ b/examples/api/lib/material/radio/radio.toggleable.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/radio_list_tile/radio_list_tile.0.dart b/examples/api/lib/material/radio_list_tile/radio_list_tile.0.dart index 877f6cd5e5..6c5f2548b5 100644 --- a/examples/api/lib/material/radio_list_tile/radio_list_tile.0.dart +++ b/examples/api/lib/material/radio_list_tile/radio_list_tile.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { enum SingingCharacter { lafayette, jefferson } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/radio_list_tile/radio_list_tile.1.dart b/examples/api/lib/material/radio_list_tile/radio_list_tile.1.dart index d4fb40b668..5a181eebaa 100644 --- a/examples/api/lib/material/radio_list_tile/radio_list_tile.1.dart +++ b/examples/api/lib/material/radio_list_tile/radio_list_tile.1.dart @@ -11,7 +11,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}); static const String _title = 'Flutter Code Sample'; @@ -29,13 +29,13 @@ class MyApp extends StatelessWidget { class LinkedLabelRadio extends StatelessWidget { const LinkedLabelRadio({ - Key? key, + super.key, required this.label, required this.padding, required this.groupValue, required this.value, required this.onChanged, - }) : super(key: key); + }); final String label; final EdgeInsets padding; @@ -75,7 +75,7 @@ class LinkedLabelRadio extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/radio_list_tile/radio_list_tile.2.dart b/examples/api/lib/material/radio_list_tile/radio_list_tile.2.dart index 07449c4eac..7824f5500d 100644 --- a/examples/api/lib/material/radio_list_tile/radio_list_tile.2.dart +++ b/examples/api/lib/material/radio_list_tile/radio_list_tile.2.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}); static const String _title = 'Flutter Code Sample'; @@ -27,13 +27,13 @@ class MyApp extends StatelessWidget { class LabeledRadio extends StatelessWidget { const LabeledRadio({ - Key? key, + super.key, required this.label, required this.padding, required this.groupValue, required this.value, required this.onChanged, - }) : super(key: key); + }); final String label; final EdgeInsets padding; @@ -69,7 +69,7 @@ class LabeledRadio extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/radio_list_tile/radio_list_tile.toggleable.0.dart b/examples/api/lib/material/radio_list_tile/radio_list_tile.toggleable.0.dart index 9d1cbfe5a5..5c9fc9b637 100644 --- a/examples/api/lib/material/radio_list_tile/radio_list_tile.toggleable.0.dart +++ b/examples/api/lib/material/radio_list_tile/radio_list_tile.toggleable.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/range_slider/range_slider.0.dart b/examples/api/lib/material/range_slider/range_slider.0.dart index 54af89063d..65fe064f87 100644 --- a/examples/api/lib/material/range_slider/range_slider.0.dart +++ b/examples/api/lib/material/range_slider/range_slider.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/refresh_indicator/refresh_indicator.0.dart b/examples/api/lib/material/refresh_indicator/refresh_indicator.0.dart index 9a14e29576..ac9db74ae1 100644 --- a/examples/api/lib/material/refresh_indicator/refresh_indicator.0.dart +++ b/examples/api/lib/material/refresh_indicator/refresh_indicator.0.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}); static const String _title = 'RefreshIndicator Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class RefreshIndicatorExample extends StatefulWidget { - const RefreshIndicatorExample({Key? key, required this.title}) : super(key: key); + const RefreshIndicatorExample({super.key, required this.title}); final String title; diff --git a/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart b/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart index d8b1ff7e60..fffab71e5b 100644 --- a/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart +++ b/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ReorderableApp()); class ReorderableApp extends StatelessWidget { - const ReorderableApp({Key? key}) : super(key: key); + const ReorderableApp({super.key}); @override Widget build(BuildContext context) { @@ -23,7 +23,7 @@ class ReorderableApp extends StatelessWidget { } class ReorderableExample extends StatefulWidget { - const ReorderableExample({Key? key}) : super(key: key); + const ReorderableExample({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/reorderable_list/reorderable_list_view.1.dart b/examples/api/lib/material/reorderable_list/reorderable_list_view.1.dart index f5c7253991..53bca26d1d 100644 --- a/examples/api/lib/material/reorderable_list/reorderable_list_view.1.dart +++ b/examples/api/lib/material/reorderable_list/reorderable_list_view.1.dart @@ -10,7 +10,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ReorderableApp()); class ReorderableApp extends StatelessWidget { - const ReorderableApp({Key? key}) : super(key: key); + const ReorderableApp({super.key}); @override Widget build(BuildContext context) { @@ -24,7 +24,7 @@ class ReorderableApp extends StatelessWidget { } class ReorderableExample extends StatefulWidget { - const ReorderableExample({Key? key}) : super(key: key); + const ReorderableExample({super.key}); @override State createState() => _ReorderableExampleState(); diff --git a/examples/api/lib/material/reorderable_list/reorderable_list_view.build_default_drag_handles.0.dart b/examples/api/lib/material/reorderable_list/reorderable_list_view.build_default_drag_handles.0.dart index 6ff97788bf..466c8388bd 100644 --- a/examples/api/lib/material/reorderable_list/reorderable_list_view.build_default_drag_handles.0.dart +++ b/examples/api/lib/material/reorderable_list/reorderable_list_view.build_default_drag_handles.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ReorderableApp()); class ReorderableApp extends StatelessWidget { - const ReorderableApp({Key? key}) : super(key: key); + const ReorderableApp({super.key}); @override Widget build(BuildContext context) { @@ -23,7 +23,7 @@ class ReorderableApp extends StatelessWidget { } class ReorderableExample extends StatefulWidget { - const ReorderableExample({Key? key}) : super(key: key); + const ReorderableExample({super.key}); @override State createState() => _ReorderableExampleState(); diff --git a/examples/api/lib/material/reorderable_list/reorderable_list_view.reorderable_list_view_builder.0.dart b/examples/api/lib/material/reorderable_list/reorderable_list_view.reorderable_list_view_builder.0.dart index 6de07e7053..e25f8b8b08 100644 --- a/examples/api/lib/material/reorderable_list/reorderable_list_view.reorderable_list_view_builder.0.dart +++ b/examples/api/lib/material/reorderable_list/reorderable_list_view.reorderable_list_view_builder.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ReorderableApp()); class ReorderableApp extends StatelessWidget { - const ReorderableApp({Key? key}) : super(key: key); + const ReorderableApp({super.key}); @override Widget build(BuildContext context) { @@ -25,7 +25,7 @@ class ReorderableApp extends StatelessWidget { } class ReorderableExample extends StatefulWidget { - const ReorderableExample({Key? key}) : super(key: key); + const ReorderableExample({super.key}); @override State createState() => _ReorderableExampleState(); diff --git a/examples/api/lib/material/scaffold/scaffold.0.dart b/examples/api/lib/material/scaffold/scaffold.0.dart index 110c0c98d3..f3b65bb936 100644 --- a/examples/api/lib/material/scaffold/scaffold.0.dart +++ b/examples/api/lib/material/scaffold/scaffold.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/scaffold/scaffold.1.dart b/examples/api/lib/material/scaffold/scaffold.1.dart index 06a6539ed0..4382ffaa60 100644 --- a/examples/api/lib/material/scaffold/scaffold.1.dart +++ b/examples/api/lib/material/scaffold/scaffold.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/scaffold/scaffold.2.dart b/examples/api/lib/material/scaffold/scaffold.2.dart index f2d350ee5f..a21bcf6baa 100644 --- a/examples/api/lib/material/scaffold/scaffold.2.dart +++ b/examples/api/lib/material/scaffold/scaffold.2.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/scaffold/scaffold.drawer.0.dart b/examples/api/lib/material/scaffold/scaffold.drawer.0.dart index 784c020d16..0d67f8ea5d 100644 --- a/examples/api/lib/material/scaffold/scaffold.drawer.0.dart +++ b/examples/api/lib/material/scaffold/scaffold.drawer.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/scaffold/scaffold.end_drawer.0.dart b/examples/api/lib/material/scaffold/scaffold.end_drawer.0.dart index bd41629be2..0d56d4ea07 100644 --- a/examples/api/lib/material/scaffold/scaffold.end_drawer.0.dart +++ b/examples/api/lib/material/scaffold/scaffold.end_drawer.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/scaffold/scaffold.of.0.dart b/examples/api/lib/material/scaffold/scaffold.of.0.dart index 85c9046ab7..58ce0baa44 100644 --- a/examples/api/lib/material/scaffold/scaffold.of.0.dart +++ b/examples/api/lib/material/scaffold/scaffold.of.0.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 @@ -29,7 +29,7 @@ class MyApp extends StatelessWidget { } class MyScaffoldBody extends StatelessWidget { - const MyScaffoldBody({Key? key}) : super(key: key); + const MyScaffoldBody({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/scaffold/scaffold.of.1.dart b/examples/api/lib/material/scaffold/scaffold.of.1.dart index b1ee37af70..7402b464e3 100644 --- a/examples/api/lib/material/scaffold/scaffold.of.1.dart +++ b/examples/api/lib/material/scaffold/scaffold.of.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/scaffold/scaffold_messenger.0.dart b/examples/api/lib/material/scaffold/scaffold_messenger.0.dart index 6d3ab9de94..99ffec742d 100644 --- a/examples/api/lib/material/scaffold/scaffold_messenger.0.dart +++ b/examples/api/lib/material/scaffold/scaffold_messenger.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/scaffold/scaffold_messenger.of.0.dart b/examples/api/lib/material/scaffold/scaffold_messenger.of.0.dart index 11e54aac80..84146cafb6 100644 --- a/examples/api/lib/material/scaffold/scaffold_messenger.of.0.dart +++ b/examples/api/lib/material/scaffold/scaffold_messenger.of.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/scaffold/scaffold_messenger.of.1.dart b/examples/api/lib/material/scaffold/scaffold_messenger.of.1.dart index 992fc593ea..b0bd2901d1 100644 --- a/examples/api/lib/material/scaffold/scaffold_messenger.of.1.dart +++ b/examples/api/lib/material/scaffold/scaffold_messenger.of.1.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatefulWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override State createState() => _MyAppState(); diff --git a/examples/api/lib/material/scaffold/scaffold_messenger_state.show_material_banner.0.dart b/examples/api/lib/material/scaffold/scaffold_messenger_state.show_material_banner.0.dart index b93c79f4e4..29cfbd3be7 100644 --- a/examples/api/lib/material/scaffold/scaffold_messenger_state.show_material_banner.0.dart +++ b/examples/api/lib/material/scaffold/scaffold_messenger_state.show_material_banner.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/scaffold/scaffold_messenger_state.show_snack_bar.0.dart b/examples/api/lib/material/scaffold/scaffold_messenger_state.show_snack_bar.0.dart index 13272dd1c6..c225d55700 100644 --- a/examples/api/lib/material/scaffold/scaffold_messenger_state.show_snack_bar.0.dart +++ b/examples/api/lib/material/scaffold/scaffold_messenger_state.show_snack_bar.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.0.dart b/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.0.dart index cdd742cf7d..566ca06d96 100644 --- a/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.0.dart +++ b/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/scaffold/scaffold_state.show_snack_bar.0.dart b/examples/api/lib/material/scaffold/scaffold_state.show_snack_bar.0.dart index 9703233c35..7c6cb6e613 100644 --- a/examples/api/lib/material/scaffold/scaffold_state.show_snack_bar.0.dart +++ b/examples/api/lib/material/scaffold/scaffold_state.show_snack_bar.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/scrollbar/scrollbar.0.dart b/examples/api/lib/material/scrollbar/scrollbar.0.dart index fd43270616..aa48478577 100644 --- a/examples/api/lib/material/scrollbar/scrollbar.0.dart +++ b/examples/api/lib/material/scrollbar/scrollbar.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/scrollbar/scrollbar.1.dart b/examples/api/lib/material/scrollbar/scrollbar.1.dart index 8e6896b1e7..a52772e30b 100644 --- a/examples/api/lib/material/scrollbar/scrollbar.1.dart +++ b/examples/api/lib/material/scrollbar/scrollbar.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/slider/slider.0.dart b/examples/api/lib/material/slider/slider.0.dart index d963f1c91a..733b4e2a70 100644 --- a/examples/api/lib/material/slider/slider.0.dart +++ b/examples/api/lib/material/slider/slider.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/snack_bar/snack_bar.0.dart b/examples/api/lib/material/snack_bar/snack_bar.0.dart index 15f93d4bde..2300ea97d5 100644 --- a/examples/api/lib/material/snack_bar/snack_bar.0.dart +++ b/examples/api/lib/material/snack_bar/snack_bar.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/snack_bar/snack_bar.1.dart b/examples/api/lib/material/snack_bar/snack_bar.1.dart index c376554866..80b6720d8c 100644 --- a/examples/api/lib/material/snack_bar/snack_bar.1.dart +++ b/examples/api/lib/material/snack_bar/snack_bar.1.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/stepper/stepper.0.dart b/examples/api/lib/material/stepper/stepper.0.dart index be246c799a..c9935c87c4 100644 --- a/examples/api/lib/material/stepper/stepper.0.dart +++ b/examples/api/lib/material/stepper/stepper.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/stepper/stepper.controls_builder.0.dart b/examples/api/lib/material/stepper/stepper.controls_builder.0.dart index 5f394d3d03..29b8a373c9 100644 --- a/examples/api/lib/material/stepper/stepper.controls_builder.0.dart +++ b/examples/api/lib/material/stepper/stepper.controls_builder.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/switch_list_tile/switch_list_tile.0.dart b/examples/api/lib/material/switch_list_tile/switch_list_tile.0.dart index e995fbf1e5..36ded9664d 100644 --- a/examples/api/lib/material/switch_list_tile/switch_list_tile.0.dart +++ b/examples/api/lib/material/switch_list_tile/switch_list_tile.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/switch_list_tile/switch_list_tile.1.dart b/examples/api/lib/material/switch_list_tile/switch_list_tile.1.dart index ea24f2ae56..5a7ad01eed 100644 --- a/examples/api/lib/material/switch_list_tile/switch_list_tile.1.dart +++ b/examples/api/lib/material/switch_list_tile/switch_list_tile.1.dart @@ -11,7 +11,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}); static const String _title = 'Flutter Code Sample'; @@ -31,12 +31,12 @@ class MyApp extends StatelessWidget { class LinkedLabelSwitch extends StatelessWidget { const LinkedLabelSwitch({ - Key? key, + super.key, required this.label, required this.padding, required this.value, required this.onChanged, - }) : super(key: key); + }); final String label; final EdgeInsets padding; @@ -77,7 +77,7 @@ class LinkedLabelSwitch extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/switch_list_tile/switch_list_tile.2.dart b/examples/api/lib/material/switch_list_tile/switch_list_tile.2.dart index 8c6a5def2c..4b67345c12 100644 --- a/examples/api/lib/material/switch_list_tile/switch_list_tile.2.dart +++ b/examples/api/lib/material/switch_list_tile/switch_list_tile.2.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}); static const String _title = 'Flutter Code Sample'; @@ -29,12 +29,12 @@ class MyApp extends StatelessWidget { class LabeledSwitch extends StatelessWidget { const LabeledSwitch({ - Key? key, + super.key, required this.label, required this.padding, required this.value, required this.onChanged, - }) : super(key: key); + }); final String label; final EdgeInsets padding; @@ -66,7 +66,7 @@ class LabeledSwitch extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/tab_controller/tab_controller.1.dart b/examples/api/lib/material/tab_controller/tab_controller.1.dart index b49af92dd8..894f39029d 100644 --- a/examples/api/lib/material/tab_controller/tab_controller.1.dart +++ b/examples/api/lib/material/tab_controller/tab_controller.1.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}); static const String _title = 'Flutter Code Sample'; @@ -29,7 +29,7 @@ const List tabs = [ ]; class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/tabs/tab_bar.0.dart b/examples/api/lib/material/tabs/tab_bar.0.dart index ad9322c1b7..91bb16e9f2 100644 --- a/examples/api/lib/material/tabs/tab_bar.0.dart +++ b/examples/api/lib/material/tabs/tab_bar.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/tabs/tab_bar.1.dart b/examples/api/lib/material/tabs/tab_bar.1.dart index ae803d49f7..bb58d66112 100644 --- a/examples/api/lib/material/tabs/tab_bar.1.dart +++ b/examples/api/lib/material/tabs/tab_bar.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/text_button/text_button.0.dart b/examples/api/lib/material/text_button/text_button.0.dart index d9e75e3ffb..82d9924d54 100644 --- a/examples/api/lib/material/text_button/text_button.0.dart +++ b/examples/api/lib/material/text_button/text_button.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/text_field/text_field.1.dart b/examples/api/lib/material/text_field/text_field.1.dart index 92bdd86462..a3651b6613 100644 --- a/examples/api/lib/material/text_field/text_field.1.dart +++ b/examples/api/lib/material/text_field/text_field.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/text_form_field/text_form_field.1.dart b/examples/api/lib/material/text_form_field/text_form_field.1.dart index 890179c0fb..72002230af 100644 --- a/examples/api/lib/material/text_form_field/text_form_field.1.dart +++ b/examples/api/lib/material/text_form_field/text_form_field.1.dart @@ -10,7 +10,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/material/theme/theme_extension.1.dart b/examples/api/lib/material/theme/theme_extension.1.dart index 85be388b55..6a6cef5a44 100644 --- a/examples/api/lib/material/theme/theme_extension.1.dart +++ b/examples/api/lib/material/theme/theme_extension.1.dart @@ -48,7 +48,7 @@ void main() { } class MyApp extends StatefulWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -94,10 +94,10 @@ class _MyAppState extends State { class Home extends StatelessWidget { const Home({ - Key? key, + super.key, required this.isLightTheme, required this.toggleTheme, - }) : super(key: key); + }); final bool isLightTheme; final void Function() toggleTheme; diff --git a/examples/api/lib/material/toggle_buttons/toggle_buttons.0.dart b/examples/api/lib/material/toggle_buttons/toggle_buttons.0.dart index 1b3e86859d..ed595b3c9f 100644 --- a/examples/api/lib/material/toggle_buttons/toggle_buttons.0.dart +++ b/examples/api/lib/material/toggle_buttons/toggle_buttons.0.dart @@ -27,7 +27,7 @@ const List icons = [ void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'ToggleButtons Sample'; @@ -41,7 +41,7 @@ class MyApp extends StatelessWidget { } class ToggleButtonsSample extends StatefulWidget { - const ToggleButtonsSample({Key? key, required this.title}) : super(key: key); + const ToggleButtonsSample({super.key, required this.title}); final String title; diff --git a/examples/api/lib/material/tooltip/tooltip.0.dart b/examples/api/lib/material/tooltip/tooltip.0.dart index dee6c9610e..046ec26eea 100644 --- a/examples/api/lib/material/tooltip/tooltip.0.dart +++ b/examples/api/lib/material/tooltip/tooltip.0.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}); static const String _title = 'Tooltip Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class TooltipSample extends StatelessWidget { - const TooltipSample({Key? key}) : super(key: key); + const TooltipSample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/tooltip/tooltip.1.dart b/examples/api/lib/material/tooltip/tooltip.1.dart index 0944eb6ee8..429e79d5e5 100644 --- a/examples/api/lib/material/tooltip/tooltip.1.dart +++ b/examples/api/lib/material/tooltip/tooltip.1.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}); static const String _title = 'Tooltip Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class TooltipSample extends StatelessWidget { - const TooltipSample({Key? key}) : super(key: key); + const TooltipSample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/tooltip/tooltip.2.dart b/examples/api/lib/material/tooltip/tooltip.2.dart index be81b8509a..bd8a360ce2 100644 --- a/examples/api/lib/material/tooltip/tooltip.2.dart +++ b/examples/api/lib/material/tooltip/tooltip.2.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}); static const String _title = 'Tooltip Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class TooltipSample extends StatelessWidget { - const TooltipSample({Key? key}) : super(key: key); + const TooltipSample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/material/tooltip/tooltip.3.dart b/examples/api/lib/material/tooltip/tooltip.3.dart index aac2be0d1b..01469c623c 100644 --- a/examples/api/lib/material/tooltip/tooltip.3.dart +++ b/examples/api/lib/material/tooltip/tooltip.3.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}); static const String _title = 'Tooltip Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class TooltipSample extends StatelessWidget { - const TooltipSample({Key? key, required this.title}) : super(key: key); + const TooltipSample({super.key, required this.title}); final String title; diff --git a/examples/api/lib/painting/gradient/linear_gradient.0.dart b/examples/api/lib/painting/gradient/linear_gradient.0.dart index 6d5f902757..94494f71c2 100644 --- a/examples/api/lib/painting/gradient/linear_gradient.0.dart +++ b/examples/api/lib/painting/gradient/linear_gradient.0.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}); @override Widget build(BuildContext context) { @@ -18,7 +18,7 @@ class MyApp extends StatelessWidget { } class MoodyGradient extends StatelessWidget { - const MoodyGradient({Key? key}) : super(key: key); + const MoodyGradient({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.0.dart b/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.0.dart index 1f9bb3651a..05204e82a5 100644 --- a/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.0.dart +++ b/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.1.dart b/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.1.dart index f249eb842e..8b408fd339 100644 --- a/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.1.dart +++ b/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/services/keyboard_key/logical_keyboard_key.0.dart b/examples/api/lib/services/keyboard_key/logical_keyboard_key.0.dart index 200c23295f..b20b00240b 100644 --- a/examples/api/lib/services/keyboard_key/logical_keyboard_key.0.dart +++ b/examples/api/lib/services/keyboard_key/logical_keyboard_key.0.dart @@ -11,7 +11,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const KeyExampleApp()); class KeyExampleApp extends StatelessWidget { - const KeyExampleApp({Key? key}) : super(key: key); + const KeyExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -25,7 +25,7 @@ class KeyExampleApp extends StatelessWidget { } class MyKeyExample extends StatefulWidget { - const MyKeyExample({Key? key}) : super(key: key); + const MyKeyExample({super.key}); @override State createState() => _MyKeyExampleState(); diff --git a/examples/api/lib/services/keyboard_key/physical_keyboard_key.0.dart b/examples/api/lib/services/keyboard_key/physical_keyboard_key.0.dart index 282ba9d5f0..282e413e8e 100644 --- a/examples/api/lib/services/keyboard_key/physical_keyboard_key.0.dart +++ b/examples/api/lib/services/keyboard_key/physical_keyboard_key.0.dart @@ -11,7 +11,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const KeyExampleApp()); class KeyExampleApp extends StatelessWidget { - const KeyExampleApp({Key? key}) : super(key: key); + const KeyExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -25,7 +25,7 @@ class KeyExampleApp extends StatelessWidget { } class MyPhysicalKeyExample extends StatefulWidget { - const MyPhysicalKeyExample({Key? key}) : super(key: key); + const MyPhysicalKeyExample({super.key}); @override State createState() => _MyPhysicalKeyExampleState(); diff --git a/examples/api/lib/services/mouse_cursor/mouse_cursor.0.dart b/examples/api/lib/services/mouse_cursor/mouse_cursor.0.dart index 9e0b2676b5..152da48de3 100644 --- a/examples/api/lib/services/mouse_cursor/mouse_cursor.0.dart +++ b/examples/api/lib/services/mouse_cursor/mouse_cursor.0.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}); static const String _title = 'MouseCursor Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/services/system_chrome/system_chrome.set_system_u_i_overlay_style.1.dart b/examples/api/lib/services/system_chrome/system_chrome.set_system_u_i_overlay_style.1.dart index 7e69959cb5..0d5172d331 100644 --- a/examples/api/lib/services/system_chrome/system_chrome.set_system_u_i_overlay_style.1.dart +++ b/examples/api/lib/services/system_chrome/system_chrome.set_system_u_i_overlay_style.1.dart @@ -12,7 +12,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/ui/text/font_feature.0.dart b/examples/api/lib/ui/text/font_feature.0.dart index 070333eb7e..fe887d1cf5 100644 --- a/examples/api/lib/ui/text/font_feature.0.dart +++ b/examples/api/lib/ui/text/font_feature.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -27,7 +27,7 @@ final TextStyle titleStyle = TextStyle( ); class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_alternative.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_alternative.0.dart index ce2155acba..205eb5e191 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_alternative.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_alternative.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_alternative_fractions.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_alternative_fractions.0.dart index 3ceebb4ed1..0fb42bfbdd 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_alternative_fractions.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_alternative_fractions.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_case_sensitive_forms.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_case_sensitive_forms.0.dart index a70f5b389c..aba960b76e 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_case_sensitive_forms.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_case_sensitive_forms.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_character_variant.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_character_variant.0.dart index 58c4eed650..0eebf1c4e7 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_character_variant.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_character_variant.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_contextual_alternates.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_contextual_alternates.0.dart index 05fadd8900..860761a110 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_contextual_alternates.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_contextual_alternates.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_denominator.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_denominator.0.dart index 516ba413cc..e1f140520b 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_denominator.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_denominator.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_fractions.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_fractions.0.dart index 306d463eb3..6ff71ceacd 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_fractions.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_fractions.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_historical_forms.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_historical_forms.0.dart index 81d6a4792c..a3bc360872 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_historical_forms.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_historical_forms.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_historical_ligatures.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_historical_ligatures.0.dart index b95b954b51..bf1a862095 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_historical_ligatures.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_historical_ligatures.0.dart @@ -11,7 +11,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -23,7 +23,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_lining_figures.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_lining_figures.0.dart index 26cf4eb520..dd59c02507 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_lining_figures.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_lining_figures.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_locale_aware.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_locale_aware.0.dart index 830d1b72f7..03ac698244 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_locale_aware.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_locale_aware.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -21,7 +21,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_notational_forms.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_notational_forms.0.dart index e617a75cf3..3563236ff9 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_notational_forms.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_notational_forms.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_numerators.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_numerators.0.dart index d7af51cba7..d15974baeb 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_numerators.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_numerators.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -23,7 +23,7 @@ class ExampleApp extends StatelessWidget { /// This is the stateless widget that the main application instantiates. class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_oldstyle_figures.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_oldstyle_figures.0.dart index a18d239994..435d6fe630 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_oldstyle_figures.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_oldstyle_figures.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_ordinal_forms.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_ordinal_forms.0.dart index 4b8ef03627..df78fc3669 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_ordinal_forms.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_ordinal_forms.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_proportional_figures.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_proportional_figures.0.dart index 4113b79b13..894e5143e3 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_proportional_figures.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_proportional_figures.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_scientific_inferiors.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_scientific_inferiors.0.dart index f30a35dd28..2bb2f52769 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_scientific_inferiors.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_scientific_inferiors.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_slashed_zero.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_slashed_zero.0.dart index ae1873913f..c244d82c69 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_slashed_zero.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_slashed_zero.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_stylistic_alternates.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_stylistic_alternates.0.dart index d1dc90099e..181481907f 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_stylistic_alternates.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_stylistic_alternates.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.0.dart index 70dd1d6d3a..1d81dd3a38 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.1.dart b/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.1.dart index 650f036468..6f427b6ade 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.1.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.1.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_subscripts.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_subscripts.0.dart index cfaea355e7..2ebeabc341 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_subscripts.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_subscripts.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_superscripts.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_superscripts.0.dart index 81d64781a2..9f64745c5e 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_superscripts.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_superscripts.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_swash.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_swash.0.dart index bebf97c3cd..eca24ec7b8 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_swash.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_swash.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/ui/text/font_feature.font_feature_tabular_figures.0.dart b/examples/api/lib/ui/text/font_feature.font_feature_tabular_figures.0.dart index 989def890e..e2b09fb29b 100644 --- a/examples/api/lib/ui/text/font_feature.font_feature_tabular_figures.0.dart +++ b/examples/api/lib/ui/text/font_feature.font_feature_tabular_figures.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/actions/action.action_overridable.0.dart b/examples/api/lib/widgets/actions/action.action_overridable.0.dart index 06fb11cf8f..0844c4669f 100644 --- a/examples/api/lib/widgets/actions/action.action_overridable.0.dart +++ b/examples/api/lib/widgets/actions/action.action_overridable.0.dart @@ -21,12 +21,12 @@ void main() { // [DeleteCharacterIntent] intent. class DigitInput extends StatefulWidget { const DigitInput({ - Key? key, + super.key, required this.controller, required this.focusNode, this.maxLength, this.textInputAction = TextInputAction.next, - }) : super(key: key); + }); final int? maxLength; final TextEditingController controller; @@ -73,7 +73,7 @@ class DigitInputState extends State { } class SimpleUSPhoneNumberEntry extends StatefulWidget { - const SimpleUSPhoneNumberEntry({Key? key}) : super(key: key); + const SimpleUSPhoneNumberEntry({super.key}); @override State createState() => diff --git a/examples/api/lib/widgets/actions/action_listener.0.dart b/examples/api/lib/widgets/actions/action_listener.0.dart index aa5f5ac0f7..7e146534da 100644 --- a/examples/api/lib/widgets/actions/action_listener.0.dart +++ b/examples/api/lib/widgets/actions/action_listener.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class ActionListenerExample extends StatefulWidget { - const ActionListenerExample({Key? key}) : super(key: key); + const ActionListenerExample({super.key}); @override State createState() => _ActionListenerExampleState(); @@ -111,7 +111,7 @@ class MyIntent extends Intent { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/actions/actions.0.dart b/examples/api/lib/widgets/actions/actions.0.dart index 3fb02a1102..d088fb56f2 100644 --- a/examples/api/lib/widgets/actions/actions.0.dart +++ b/examples/api/lib/widgets/actions/actions.0.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}); static const String _title = 'Flutter Code Sample'; @@ -81,7 +81,7 @@ class SaveAction extends Action { } class SaveButton extends StatefulWidget { - const SaveButton(this.valueNotifier, {Key? key}) : super(key: key); + const SaveButton(this.valueNotifier, {super.key}); final ValueNotifier valueNotifier; @@ -117,7 +117,7 @@ class _SaveButtonState extends State { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/actions/focusable_action_detector.0.dart b/examples/api/lib/widgets/actions/focusable_action_detector.0.dart index 81476d7c3b..12bc1f5e0c 100644 --- a/examples/api/lib/widgets/actions/focusable_action_detector.0.dart +++ b/examples/api/lib/widgets/actions/focusable_action_detector.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -25,10 +25,10 @@ class MyApp extends StatelessWidget { class FadButton extends StatefulWidget { const FadButton({ - Key? key, + super.key, required this.onPressed, required this.child, - }) : super(key: key); + }); final VoidCallback onPressed; final Widget child; @@ -116,7 +116,7 @@ class _FadButtonState extends State { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/animated_list/animated_list.0.dart b/examples/api/lib/widgets/animated_list/animated_list.0.dart index 0debd1509a..3869322a3c 100644 --- a/examples/api/lib/widgets/animated_list/animated_list.0.dart +++ b/examples/api/lib/widgets/animated_list/animated_list.0.dart @@ -11,7 +11,7 @@ void main() { } class AnimatedListSample extends StatefulWidget { - const AnimatedListSample({Key? key}) : super(key: key); + const AnimatedListSample({super.key}); @override State createState() => _AnimatedListSampleState(); @@ -172,13 +172,12 @@ class ListModel { /// varies from 0 to 128 as the animation varies from 0.0 to 1.0. class CardItem extends StatelessWidget { const CardItem({ - Key? key, + super.key, this.onTap, this.selected = false, required this.animation, required this.item, - }) : assert(item >= 0), - super(key: key); + }) : assert(item >= 0); final Animation animation; final VoidCallback? onTap; diff --git a/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart b/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart index 50fb1bf136..f29698aa87 100644 --- a/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart +++ b/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const SliverAnimatedListSample()); class SliverAnimatedListSample extends StatefulWidget { - const SliverAnimatedListSample({Key? key}) : super(key: key); + const SliverAnimatedListSample({super.key}); @override State createState() => @@ -191,13 +191,12 @@ class ListModel { // transitions from 0.0 to 1.0. class CardItem extends StatelessWidget { const CardItem({ - Key? key, + super.key, this.onTap, this.selected = false, required this.animation, required this.item, - }) : assert(item >= 0), - super(key: key); + }) : assert(item >= 0); final Animation animation; final VoidCallback? onTap; diff --git a/examples/api/lib/widgets/animated_size/animated_size.0.dart b/examples/api/lib/widgets/animated_size/animated_size.0.dart index 975b385279..7847952caf 100644 --- a/examples/api/lib/widgets/animated_size/animated_size.0.dart +++ b/examples/api/lib/widgets/animated_size/animated_size.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/animated_switcher/animated_switcher.0.dart b/examples/api/lib/widgets/animated_switcher/animated_switcher.0.dart index fb86565674..d0704f81a8 100644 --- a/examples/api/lib/widgets/animated_switcher/animated_switcher.0.dart +++ b/examples/api/lib/widgets/animated_switcher/animated_switcher.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/async/future_builder.0.dart b/examples/api/lib/widgets/async/future_builder.0.dart index 512a10825c..f93ae2608b 100644 --- a/examples/api/lib/widgets/async/future_builder.0.dart +++ b/examples/api/lib/widgets/async/future_builder.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/async/stream_builder.0.dart b/examples/api/lib/widgets/async/stream_builder.0.dart index 906f676a97..4687ec834e 100644 --- a/examples/api/lib/widgets/async/stream_builder.0.dart +++ b/examples/api/lib/widgets/async/stream_builder.0.dart @@ -11,7 +11,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}); static const String _title = 'Flutter Code Sample'; @@ -25,7 +25,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart b/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart index 1c13a6eb0e..03319abea7 100644 --- a/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart +++ b/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const AutocompleteExampleApp()); class AutocompleteExampleApp extends StatelessWidget { - const AutocompleteExampleApp({Key? key}) : super(key: key); + const AutocompleteExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -27,7 +27,7 @@ class AutocompleteExampleApp extends StatelessWidget { } class AutocompleteBasicExample extends StatelessWidget { - const AutocompleteBasicExample({Key? key}) : super(key: key); + const AutocompleteBasicExample({super.key}); static const List _options = [ 'aardvark', diff --git a/examples/api/lib/widgets/autocomplete/raw_autocomplete.1.dart b/examples/api/lib/widgets/autocomplete/raw_autocomplete.1.dart index 6f167131dc..7cb3ff9a20 100644 --- a/examples/api/lib/widgets/autocomplete/raw_autocomplete.1.dart +++ b/examples/api/lib/widgets/autocomplete/raw_autocomplete.1.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const AutocompleteExampleApp()); class AutocompleteExampleApp extends StatelessWidget { - const AutocompleteExampleApp({Key? key}) : super(key: key); + const AutocompleteExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -55,7 +55,7 @@ class User { } class AutocompleteCustomTypeExample extends StatelessWidget { - const AutocompleteCustomTypeExample({Key? key}) : super(key: key); + const AutocompleteCustomTypeExample({super.key}); static const List _userOptions = [ User(name: 'Alice', email: 'alice@example.com'), diff --git a/examples/api/lib/widgets/autocomplete/raw_autocomplete.2.dart b/examples/api/lib/widgets/autocomplete/raw_autocomplete.2.dart index 7d0e8f6de0..cb39ac9440 100644 --- a/examples/api/lib/widgets/autocomplete/raw_autocomplete.2.dart +++ b/examples/api/lib/widgets/autocomplete/raw_autocomplete.2.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const AutocompleteExampleApp()); class AutocompleteExampleApp extends StatelessWidget { - const AutocompleteExampleApp({Key? key}) : super(key: key); + const AutocompleteExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -27,7 +27,7 @@ class AutocompleteExampleApp extends StatelessWidget { } class AutocompleteFormExample extends StatefulWidget { - const AutocompleteFormExample({Key? key}) : super(key: key); + const AutocompleteFormExample({super.key}); @override AutocompleteFormExampleState createState() => AutocompleteFormExampleState(); diff --git a/examples/api/lib/widgets/autocomplete/raw_autocomplete.focus_node.0.dart b/examples/api/lib/widgets/autocomplete/raw_autocomplete.focus_node.0.dart index f7fc71af2f..0f11883052 100644 --- a/examples/api/lib/widgets/autocomplete/raw_autocomplete.focus_node.0.dart +++ b/examples/api/lib/widgets/autocomplete/raw_autocomplete.focus_node.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const AutocompleteExampleApp()); class AutocompleteExampleApp extends StatelessWidget { - const AutocompleteExampleApp({Key? key}) : super(key: key); + const AutocompleteExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -26,7 +26,7 @@ const List _options = [ ]; class RawAutocompleteSplit extends StatefulWidget { - const RawAutocompleteSplit({Key? key}) : super(key: key); + const RawAutocompleteSplit({super.key}); @override RawAutocompleteSplitState createState() => RawAutocompleteSplitState(); diff --git a/examples/api/lib/widgets/autofill/autofill_group.0.dart b/examples/api/lib/widgets/autofill/autofill_group.0.dart index dea0e1ae27..4a2a6b12b9 100644 --- a/examples/api/lib/widgets/autofill/autofill_group.0.dart +++ b/examples/api/lib/widgets/autofill/autofill_group.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/basic/absorb_pointer.0.dart b/examples/api/lib/widgets/basic/absorb_pointer.0.dart index 12936e3e1c..5e271808e5 100644 --- a/examples/api/lib/widgets/basic/absorb_pointer.0.dart +++ b/examples/api/lib/widgets/basic/absorb_pointer.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/aspect_ratio.0.dart b/examples/api/lib/widgets/basic/aspect_ratio.0.dart index 3244e76e92..9bc097b986 100644 --- a/examples/api/lib/widgets/basic/aspect_ratio.0.dart +++ b/examples/api/lib/widgets/basic/aspect_ratio.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/aspect_ratio.1.dart b/examples/api/lib/widgets/basic/aspect_ratio.1.dart index 708c919c07..573fef67a6 100644 --- a/examples/api/lib/widgets/basic/aspect_ratio.1.dart +++ b/examples/api/lib/widgets/basic/aspect_ratio.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/aspect_ratio.2.dart b/examples/api/lib/widgets/basic/aspect_ratio.2.dart index 297719e526..9ed966c0c2 100644 --- a/examples/api/lib/widgets/basic/aspect_ratio.2.dart +++ b/examples/api/lib/widgets/basic/aspect_ratio.2.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/clip_rrect.0.dart b/examples/api/lib/widgets/basic/clip_rrect.0.dart index bc4e02d8b0..caf3e9bd54 100644 --- a/examples/api/lib/widgets/basic/clip_rrect.0.dart +++ b/examples/api/lib/widgets/basic/clip_rrect.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ClipRRectApp()); class ClipRRectApp extends StatelessWidget { - const ClipRRectApp({Key? key}) : super(key: key); + const ClipRRectApp({super.key}); @override Widget build(BuildContext context) { @@ -23,7 +23,7 @@ class ClipRRectApp extends StatelessWidget { } class ClipRRectExample extends StatelessWidget { - const ClipRRectExample({Key? key}) : super(key: key); + const ClipRRectExample({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/clip_rrect.1.dart b/examples/api/lib/widgets/basic/clip_rrect.1.dart index 66b35455de..7bd19ace71 100644 --- a/examples/api/lib/widgets/basic/clip_rrect.1.dart +++ b/examples/api/lib/widgets/basic/clip_rrect.1.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ClipRRectApp()); class ClipRRectApp extends StatelessWidget { - const ClipRRectApp({Key? key}) : super(key: key); + const ClipRRectApp({super.key}); @override Widget build(BuildContext context) { @@ -23,7 +23,7 @@ class ClipRRectApp extends StatelessWidget { } class ClipRRectExample extends StatelessWidget { - const ClipRRectExample({Key? key}) : super(key: key); + const ClipRRectExample({super.key}); @override Widget build(BuildContext context) { @@ -49,7 +49,7 @@ class ClipRRectExample extends StatelessWidget { // 'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl.jpg'), // ); class _FakedImage extends StatelessWidget { - const _FakedImage({Key? key}) : super(key: key); + const _FakedImage(); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/custom_multi_child_layout.0.dart b/examples/api/lib/widgets/basic/custom_multi_child_layout.0.dart index 332754e19c..b4e5c64b6f 100644 --- a/examples/api/lib/widgets/basic/custom_multi_child_layout.0.dart +++ b/examples/api/lib/widgets/basic/custom_multi_child_layout.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ExampleApp()); class ExampleApp extends StatelessWidget { - const ExampleApp({Key? key}) : super(key: key); + const ExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -87,7 +87,7 @@ class _CascadeLayoutDelegate extends MultiChildLayoutDelegate { } class ExampleWidget extends StatelessWidget { - const ExampleWidget({Key? key}) : super(key: key); + const ExampleWidget({super.key}); static const Map _colors = { 'Red': Colors.red, diff --git a/examples/api/lib/widgets/basic/expanded.0.dart b/examples/api/lib/widgets/basic/expanded.0.dart index ae4a59fdec..0ab21baea0 100644 --- a/examples/api/lib/widgets/basic/expanded.0.dart +++ b/examples/api/lib/widgets/basic/expanded.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/expanded.1.dart b/examples/api/lib/widgets/basic/expanded.1.dart index aed0cda8fb..ead35a90ff 100644 --- a/examples/api/lib/widgets/basic/expanded.1.dart +++ b/examples/api/lib/widgets/basic/expanded.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/fitted_box.0.dart b/examples/api/lib/widgets/basic/fitted_box.0.dart index 60647ee344..0c74fd207c 100644 --- a/examples/api/lib/widgets/basic/fitted_box.0.dart +++ b/examples/api/lib/widgets/basic/fitted_box.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/flow.0.dart b/examples/api/lib/widgets/basic/flow.0.dart index af62c223c3..01e2c264c0 100644 --- a/examples/api/lib/widgets/basic/flow.0.dart +++ b/examples/api/lib/widgets/basic/flow.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const FlowApp()); class FlowApp extends StatelessWidget { - const FlowApp({Key? key}) : super(key: key); + const FlowApp({super.key}); @override Widget build(BuildContext context) { @@ -25,7 +25,7 @@ class FlowApp extends StatelessWidget { } class FlowMenu extends StatefulWidget { - const FlowMenu({Key? key}) : super(key: key); + const FlowMenu({super.key}); @override State createState() => _FlowMenuState(); diff --git a/examples/api/lib/widgets/basic/fractionally_sized_box.0.dart b/examples/api/lib/widgets/basic/fractionally_sized_box.0.dart index aca209abf9..b345dbb2f5 100644 --- a/examples/api/lib/widgets/basic/fractionally_sized_box.0.dart +++ b/examples/api/lib/widgets/basic/fractionally_sized_box.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/basic/ignore_pointer.0.dart b/examples/api/lib/widgets/basic/ignore_pointer.0.dart index 1ac2423760..3d446b880e 100644 --- a/examples/api/lib/widgets/basic/ignore_pointer.0.dart +++ b/examples/api/lib/widgets/basic/ignore_pointer.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/basic/listener.0.dart b/examples/api/lib/widgets/basic/listener.0.dart index 4de71cc14f..403918d9c0 100644 --- a/examples/api/lib/widgets/basic/listener.0.dart +++ b/examples/api/lib/widgets/basic/listener.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/basic/mouse_region.0.dart b/examples/api/lib/widgets/basic/mouse_region.0.dart index 58d30995c5..f76d3fb7ee 100644 --- a/examples/api/lib/widgets/basic/mouse_region.0.dart +++ b/examples/api/lib/widgets/basic/mouse_region.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/basic/mouse_region.on_exit.0.dart b/examples/api/lib/widgets/basic/mouse_region.on_exit.0.dart index cd586c60d2..932b03de95 100644 --- a/examples/api/lib/widgets/basic/mouse_region.on_exit.0.dart +++ b/examples/api/lib/widgets/basic/mouse_region.on_exit.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/basic/mouse_region.on_exit.1.dart b/examples/api/lib/widgets/basic/mouse_region.on_exit.1.dart index 0916dfbf58..39d2fa10c1 100644 --- a/examples/api/lib/widgets/basic/mouse_region.on_exit.1.dart +++ b/examples/api/lib/widgets/basic/mouse_region.on_exit.1.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}); static const String _title = 'Flutter Code Sample'; @@ -30,8 +30,7 @@ class MyApp extends StatelessWidget { // A region that hides its content one second after being hovered. class MyTimedButton extends StatefulWidget { const MyTimedButton( - {Key? key, required this.onEnterButton, required this.onExitButton}) - : super(key: key); + {super.key, required this.onEnterButton, required this.onExitButton}); final VoidCallback onEnterButton; final VoidCallback onExitButton; @@ -89,7 +88,7 @@ class _MyTimedButton extends State { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/basic/offstage.0.dart b/examples/api/lib/widgets/basic/offstage.0.dart index 4920e00cf5..8cbff0ada0 100644 --- a/examples/api/lib/widgets/basic/offstage.0.dart +++ b/examples/api/lib/widgets/basic/offstage.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/basic/physical_shape.0.dart b/examples/api/lib/widgets/basic/physical_shape.0.dart index 28e07118ea..1c44cb54f4 100644 --- a/examples/api/lib/widgets/basic/physical_shape.0.dart +++ b/examples/api/lib/widgets/basic/physical_shape.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/binding/widget_binding_observer.0.dart b/examples/api/lib/widgets/binding/widget_binding_observer.0.dart index 304eaa61f9..8c3de53230 100644 --- a/examples/api/lib/widgets/binding/widget_binding_observer.0.dart +++ b/examples/api/lib/widgets/binding/widget_binding_observer.0.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}); @override Widget build(BuildContext context) { @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class WidgetBindingsObserverSample extends StatefulWidget { - const WidgetBindingsObserverSample({Key? key}) : super(key: key); + const WidgetBindingsObserverSample({super.key}); @override State createState() => _WidgetBindingsObserverSampleState(); diff --git a/examples/api/lib/widgets/color_filter/color_filtered.0.dart b/examples/api/lib/widgets/color_filter/color_filtered.0.dart index 583aef241b..8c59094634 100644 --- a/examples/api/lib/widgets/color_filter/color_filtered.0.dart +++ b/examples/api/lib/widgets/color_filter/color_filtered.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/dismissible/dismissible.0.dart b/examples/api/lib/widgets/dismissible/dismissible.0.dart index d2b07a1a6a..0a3dbe82ec 100644 --- a/examples/api/lib/widgets/dismissible/dismissible.0.dart +++ b/examples/api/lib/widgets/dismissible/dismissible.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/drag_target/draggable.0.dart b/examples/api/lib/widgets/drag_target/draggable.0.dart index d09bfbe223..fff0c9aaf1 100644 --- a/examples/api/lib/widgets/drag_target/draggable.0.dart +++ b/examples/api/lib/widgets/drag_target/draggable.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/editable_text/editable_text.on_changed.0.dart b/examples/api/lib/widgets/editable_text/editable_text.on_changed.0.dart index 41559343d0..f964ffe480 100644 --- a/examples/api/lib/widgets/editable_text/editable_text.on_changed.0.dart +++ b/examples/api/lib/widgets/editable_text/editable_text.on_changed.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/editable_text/text_editing_controller.0.dart b/examples/api/lib/widgets/editable_text/text_editing_controller.0.dart index fbe62f501b..af58991ef8 100644 --- a/examples/api/lib/widgets/editable_text/text_editing_controller.0.dart +++ b/examples/api/lib/widgets/editable_text/text_editing_controller.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/focus_manager/focus_node.0.dart b/examples/api/lib/widgets/focus_manager/focus_node.0.dart index cb63bfbe3a..257f089dd0 100644 --- a/examples/api/lib/widgets/focus_manager/focus_node.0.dart +++ b/examples/api/lib/widgets/focus_manager/focus_node.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -27,7 +27,7 @@ class MyApp extends StatelessWidget { } class ColorfulButton extends StatefulWidget { - const ColorfulButton({Key? key}) : super(key: key); + const ColorfulButton({super.key}); @override State createState() => _ColorfulButtonState(); @@ -115,7 +115,7 @@ class _ColorfulButtonState extends State { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/focus_manager/focus_node.unfocus.0.dart b/examples/api/lib/widgets/focus_manager/focus_node.unfocus.0.dart index b4d9cea378..294edaf17e 100644 --- a/examples/api/lib/widgets/focus_manager/focus_node.unfocus.0.dart +++ b/examples/api/lib/widgets/focus_manager/focus_node.unfocus.0.dart @@ -10,7 +10,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}); static const String _title = 'Flutter Code Sample'; @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/focus_scope/focus.0.dart b/examples/api/lib/widgets/focus_scope/focus.0.dart index 54525b708c..ef8689dcab 100644 --- a/examples/api/lib/widgets/focus_scope/focus.0.dart +++ b/examples/api/lib/widgets/focus_scope/focus.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -27,7 +27,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/focus_scope/focus.1.dart b/examples/api/lib/widgets/focus_scope/focus.1.dart index 0449e6301b..7f48b6422c 100644 --- a/examples/api/lib/widgets/focus_scope/focus.1.dart +++ b/examples/api/lib/widgets/focus_scope/focus.1.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}); static const String _title = 'Flutter Code Sample'; @@ -25,9 +25,9 @@ class MyApp extends StatelessWidget { class FocusableText extends StatelessWidget { const FocusableText( this.data, { - Key? key, + super.key, required this.autofocus, - }) : super(key: key); + }); /// The string to display as the text for this widget. final String data; @@ -59,7 +59,7 @@ class FocusableText extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/focus_scope/focus.2.dart b/examples/api/lib/widgets/focus_scope/focus.2.dart index 3d064ef6a1..402d748eeb 100644 --- a/examples/api/lib/widgets/focus_scope/focus.2.dart +++ b/examples/api/lib/widgets/focus_scope/focus.2.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/focus_scope/focus_scope.0.dart b/examples/api/lib/widgets/focus_scope/focus_scope.0.dart index dd529f9a25..ffbc3825a8 100644 --- a/examples/api/lib/widgets/focus_scope/focus_scope.0.dart +++ b/examples/api/lib/widgets/focus_scope/focus_scope.0.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}); static const String _title = 'Flutter Code Sample'; @@ -27,13 +27,13 @@ class MyApp extends StatelessWidget { /// This is just a separate widget to simplify the example. class Pane extends StatelessWidget { const Pane({ - Key? key, + super.key, required this.focusNode, this.onPressed, required this.backgroundColor, required this.icon, this.child, - }) : super(key: key); + }); final FocusNode focusNode; final VoidCallback? onPressed; @@ -67,7 +67,7 @@ class Pane extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/focus_traversal/focus_traversal_group.0.dart b/examples/api/lib/widgets/focus_traversal/focus_traversal_group.0.dart index 7182b67ed5..12f8de884e 100644 --- a/examples/api/lib/widgets/focus_traversal/focus_traversal_group.0.dart +++ b/examples/api/lib/widgets/focus_traversal/focus_traversal_group.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,12 +26,12 @@ class MyApp extends StatelessWidget { /// the type of T. class OrderedButton extends StatefulWidget { const OrderedButton({ - Key? key, + super.key, required this.name, this.canRequestFocus = true, this.autofocus = false, required this.order, - }) : super(key: key); + }); final String name; final bool canRequestFocus; @@ -121,7 +121,7 @@ class _OrderedButtonState extends State> { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/focus_traversal/ordered_traversal_policy.0.dart b/examples/api/lib/widgets/focus_traversal/ordered_traversal_policy.0.dart index aea86f97e4..e88487dce0 100644 --- a/examples/api/lib/widgets/focus_traversal/ordered_traversal_policy.0.dart +++ b/examples/api/lib/widgets/focus_traversal/ordered_traversal_policy.0.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}); static const String _title = 'Flutter Code Sample'; @@ -29,11 +29,11 @@ class MyApp extends StatelessWidget { class DemoButton extends StatelessWidget { const DemoButton({ - Key? key, + super.key, required this.name, this.autofocus = false, required this.order, - }) : super(key: key); + }); final String name; final bool autofocus; @@ -58,7 +58,7 @@ class DemoButton extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/form/form.0.dart b/examples/api/lib/widgets/form/form.0.dart index e88c639af7..2a27dd3b01 100644 --- a/examples/api/lib/widgets/form/form.0.dart +++ b/examples/api/lib/widgets/form/form.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/framework/error_widget.0.dart b/examples/api/lib/widgets/framework/error_widget.0.dart index 66c16ebd47..f3a212c4e3 100644 --- a/examples/api/lib/widgets/framework/error_widget.0.dart +++ b/examples/api/lib/widgets/framework/error_widget.0.dart @@ -32,7 +32,7 @@ void main() { } class MyApp extends StatefulWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'ErrorWidget Sample'; diff --git a/examples/api/lib/widgets/gesture_detector/gesture_detector.0.dart b/examples/api/lib/widgets/gesture_detector/gesture_detector.0.dart index b936536a04..58756ba395 100644 --- a/examples/api/lib/widgets/gesture_detector/gesture_detector.0.dart +++ b/examples/api/lib/widgets/gesture_detector/gesture_detector.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/gesture_detector/gesture_detector.1.dart b/examples/api/lib/widgets/gesture_detector/gesture_detector.1.dart index 74ebc9f3f3..c57dbe2986 100644 --- a/examples/api/lib/widgets/gesture_detector/gesture_detector.1.dart +++ b/examples/api/lib/widgets/gesture_detector/gesture_detector.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/heroes/hero.0.dart b/examples/api/lib/widgets/heroes/hero.0.dart index 7b68724777..28811f7a19 100644 --- a/examples/api/lib/widgets/heroes/hero.0.dart +++ b/examples/api/lib/widgets/heroes/hero.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const HeroApp()); class HeroApp extends StatelessWidget { - const HeroApp({Key? key}) : super(key: key); + const HeroApp({super.key}); @override Widget build(BuildContext context) { @@ -20,7 +20,7 @@ class HeroApp extends StatelessWidget { } class HeroExample extends StatelessWidget { - const HeroExample({Key? key}) : super(key: key); + const HeroExample({super.key}); @override Widget build(BuildContext context) { @@ -63,7 +63,7 @@ class HeroExample extends StatelessWidget { } class BoxWidget extends StatelessWidget { - const BoxWidget({Key? key, required this.size}) : super(key: key); + const BoxWidget({super.key, required this.size}); final Size size; diff --git a/examples/api/lib/widgets/heroes/hero.1.dart b/examples/api/lib/widgets/heroes/hero.1.dart index bbb5ad1c09..b06846cf72 100644 --- a/examples/api/lib/widgets/heroes/hero.1.dart +++ b/examples/api/lib/widgets/heroes/hero.1.dart @@ -14,7 +14,7 @@ void main() { } class HeroApp extends StatelessWidget { - const HeroApp({Key? key}) : super(key: key); + const HeroApp({super.key}); @override Widget build(BuildContext context) { @@ -25,7 +25,7 @@ class HeroApp extends StatelessWidget { } class HeroExample extends StatelessWidget { - const HeroExample({Key? key}) : super(key: key); + const HeroExample({super.key}); @override Widget build(BuildContext context) { @@ -108,10 +108,10 @@ class HeroExample extends StatelessWidget { class BoxWidget extends StatelessWidget { const BoxWidget({ - Key? key, + super.key, required this.size, required this.color, - }) : super(key: key); + }); final Size size; final Color color; diff --git a/examples/api/lib/widgets/image/image.error_builder.0.dart b/examples/api/lib/widgets/image/image.error_builder.0.dart index d97763f27c..86f2ea18ed 100644 --- a/examples/api/lib/widgets/image/image.error_builder.0.dart +++ b/examples/api/lib/widgets/image/image.error_builder.0.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}); static const String _title = 'Flutter Code Sample'; @@ -27,7 +27,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/image/image.frame_builder.0.dart b/examples/api/lib/widgets/image/image.frame_builder.0.dart index 57b299f77a..5af238b95e 100644 --- a/examples/api/lib/widgets/image/image.frame_builder.0.dart +++ b/examples/api/lib/widgets/image/image.frame_builder.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override @override diff --git a/examples/api/lib/widgets/image/image.loading_builder.0.dart b/examples/api/lib/widgets/image/image.loading_builder.0.dart index 8f5bff7b14..a1f97edce0 100644 --- a/examples/api/lib/widgets/image/image.loading_builder.0.dart +++ b/examples/api/lib/widgets/image/image.loading_builder.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/implicit_animations/animated_align.0.dart b/examples/api/lib/widgets/implicit_animations/animated_align.0.dart index d3752891d2..07806ec75c 100644 --- a/examples/api/lib/widgets/implicit_animations/animated_align.0.dart +++ b/examples/api/lib/widgets/implicit_animations/animated_align.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/implicit_animations/animated_container.0.dart b/examples/api/lib/widgets/implicit_animations/animated_container.0.dart index 526ed1b7db..420e32b35b 100644 --- a/examples/api/lib/widgets/implicit_animations/animated_container.0.dart +++ b/examples/api/lib/widgets/implicit_animations/animated_container.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/implicit_animations/animated_padding.0.dart b/examples/api/lib/widgets/implicit_animations/animated_padding.0.dart index de65957c11..3732ab95c2 100644 --- a/examples/api/lib/widgets/implicit_animations/animated_padding.0.dart +++ b/examples/api/lib/widgets/implicit_animations/animated_padding.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/implicit_animations/animated_positioned.0.dart b/examples/api/lib/widgets/implicit_animations/animated_positioned.0.dart index d0bfd56f81..5b40d01abe 100644 --- a/examples/api/lib/widgets/implicit_animations/animated_positioned.0.dart +++ b/examples/api/lib/widgets/implicit_animations/animated_positioned.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/implicit_animations/animated_slide.0.dart b/examples/api/lib/widgets/implicit_animations/animated_slide.0.dart index 93674847ab..408b111753 100644 --- a/examples/api/lib/widgets/implicit_animations/animated_slide.0.dart +++ b/examples/api/lib/widgets/implicit_animations/animated_slide.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/implicit_animations/sliver_animated_opacity.0.dart b/examples/api/lib/widgets/implicit_animations/sliver_animated_opacity.0.dart index 2fc14bc7e3..28bd5bac38 100644 --- a/examples/api/lib/widgets/implicit_animations/sliver_animated_opacity.0.dart +++ b/examples/api/lib/widgets/implicit_animations/sliver_animated_opacity.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/inherited_notifier/inherited_notifier.0.dart b/examples/api/lib/widgets/inherited_notifier/inherited_notifier.0.dart index 0e77243431..7a5b01b195 100644 --- a/examples/api/lib/widgets/inherited_notifier/inherited_notifier.0.dart +++ b/examples/api/lib/widgets/inherited_notifier/inherited_notifier.0.dart @@ -11,7 +11,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}); static const String _title = 'Flutter Code Sample'; @@ -26,10 +26,10 @@ class MyApp extends StatelessWidget { class SpinModel extends InheritedNotifier { const SpinModel({ - Key? key, - AnimationController? notifier, - required Widget child, - }) : super(key: key, notifier: notifier, child: child); + super.key, + super.notifier, + required super.child, + }); static double of(BuildContext context) { return context @@ -40,7 +40,7 @@ class SpinModel extends InheritedNotifier { } class Spinner extends StatelessWidget { - const Spinner({Key? key}) : super(key: key); + const Spinner({super.key}); @override Widget build(BuildContext context) { @@ -59,7 +59,7 @@ class Spinner extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/inherited_theme/inherited_theme.0.dart b/examples/api/lib/widgets/inherited_theme/inherited_theme.0.dart index af6d628f6d..3b2aa23a0c 100644 --- a/examples/api/lib/widgets/inherited_theme/inherited_theme.0.dart +++ b/examples/api/lib/widgets/inherited_theme/inherited_theme.0.dart @@ -11,7 +11,7 @@ void main() { } class MyAppBody extends StatelessWidget { - const MyAppBody({Key? key}) : super(key: key); + const MyAppBody({super.key}); @override Widget build(BuildContext context) { @@ -49,7 +49,7 @@ class MyAppBody extends StatelessWidget { } class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.0.dart b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.0.dart index e40704d0a5..18100fa077 100644 --- a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.0.dart +++ b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.builder.0.dart b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.builder.0.dart index 3fad51b780..00584ec0a4 100644 --- a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.builder.0.dart +++ b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.builder.0.dart @@ -10,7 +10,7 @@ import 'package:vector_math/vector_math_64.dart' show Quad, Vector3; void main() => runApp(const IVBuilderExampleApp()); class IVBuilderExampleApp extends StatelessWidget { - const IVBuilderExampleApp({Key? key}) : super(key: key); + const IVBuilderExampleApp({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.constrained.0.dart b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.constrained.0.dart index 3dd5b6943c..3bc8aad0c2 100644 --- a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.constrained.0.dart +++ b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.constrained.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.transformation_controller.0.dart b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.transformation_controller.0.dart index 8b0f51e729..1ae53871d2 100644 --- a/examples/api/lib/widgets/interactive_viewer/interactive_viewer.transformation_controller.0.dart +++ b/examples/api/lib/widgets/interactive_viewer/interactive_viewer.transformation_controller.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/layout_builder/layout_builder.0.dart b/examples/api/lib/widgets/layout_builder/layout_builder.0.dart index b1561aaa33..7db7882316 100644 --- a/examples/api/lib/widgets/layout_builder/layout_builder.0.dart +++ b/examples/api/lib/widgets/layout_builder/layout_builder.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/media_query/media_query_data.system_gesture_insets.0.dart b/examples/api/lib/widgets/media_query/media_query_data.system_gesture_insets.0.dart index 1c85e78c99..a955325988 100644 --- a/examples/api/lib/widgets/media_query/media_query_data.system_gesture_insets.0.dart +++ b/examples/api/lib/widgets/media_query/media_query_data.system_gesture_insets.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/navigator/navigator.0.dart b/examples/api/lib/widgets/navigator/navigator.0.dart index 65e42b26db..6abd303d55 100644 --- a/examples/api/lib/widgets/navigator/navigator.0.dart +++ b/examples/api/lib/widgets/navigator/navigator.0.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}); @override Widget build(BuildContext context) { @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class HomePage extends StatelessWidget { - const HomePage({Key? key}) : super(key: key); + const HomePage({super.key}); @override Widget build(BuildContext context) { @@ -42,7 +42,7 @@ class HomePage extends StatelessWidget { } class CollectPersonalInfoPage extends StatelessWidget { - const CollectPersonalInfoPage({Key? key}) : super(key: key); + const CollectPersonalInfoPage({super.key}); @override Widget build(BuildContext context) { @@ -67,9 +67,9 @@ class CollectPersonalInfoPage extends StatelessWidget { class ChooseCredentialsPage extends StatelessWidget { const ChooseCredentialsPage({ - Key? key, + super.key, required this.onSignupComplete, - }) : super(key: key); + }); final VoidCallback onSignupComplete; @@ -90,7 +90,7 @@ class ChooseCredentialsPage extends StatelessWidget { } class SignUpPage extends StatelessWidget { - const SignUpPage({Key? key}) : super(key: key); + const SignUpPage({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/navigator/navigator.restorable_push.0.dart b/examples/api/lib/widgets/navigator/navigator.restorable_push.0.dart index 1a3fc3222d..539c296e5b 100644 --- a/examples/api/lib/widgets/navigator/navigator.restorable_push.0.dart +++ b/examples/api/lib/widgets/navigator/navigator.restorable_push.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/navigator/navigator.restorable_push_and_remove_until.0.dart b/examples/api/lib/widgets/navigator/navigator.restorable_push_and_remove_until.0.dart index 78282a8660..b9fc04bb22 100644 --- a/examples/api/lib/widgets/navigator/navigator.restorable_push_and_remove_until.0.dart +++ b/examples/api/lib/widgets/navigator/navigator.restorable_push_and_remove_until.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/navigator/navigator.restorable_push_replacement.0.dart b/examples/api/lib/widgets/navigator/navigator.restorable_push_replacement.0.dart index fe1f4ddcc4..ab6a15c64e 100644 --- a/examples/api/lib/widgets/navigator/navigator.restorable_push_replacement.0.dart +++ b/examples/api/lib/widgets/navigator/navigator.restorable_push_replacement.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/navigator/navigator_state.restorable_push.0.dart b/examples/api/lib/widgets/navigator/navigator_state.restorable_push.0.dart index 754b4d9ac9..c9f74790e7 100644 --- a/examples/api/lib/widgets/navigator/navigator_state.restorable_push.0.dart +++ b/examples/api/lib/widgets/navigator/navigator_state.restorable_push.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/navigator/navigator_state.restorable_push_and_remove_until.0.dart b/examples/api/lib/widgets/navigator/navigator_state.restorable_push_and_remove_until.0.dart index 4c7fe48c10..a82c00fb78 100644 --- a/examples/api/lib/widgets/navigator/navigator_state.restorable_push_and_remove_until.0.dart +++ b/examples/api/lib/widgets/navigator/navigator_state.restorable_push_and_remove_until.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/navigator/navigator_state.restorable_push_replacement.0.dart b/examples/api/lib/widgets/navigator/navigator_state.restorable_push_replacement.0.dart index 0a190424a4..48af958235 100644 --- a/examples/api/lib/widgets/navigator/navigator_state.restorable_push_replacement.0.dart +++ b/examples/api/lib/widgets/navigator/navigator_state.restorable_push_replacement.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/navigator/restorable_route_future.0.dart b/examples/api/lib/widgets/navigator/restorable_route_future.0.dart index b52dc8968c..87634dba37 100644 --- a/examples/api/lib/widgets/navigator/restorable_route_future.0.dart +++ b/examples/api/lib/widgets/navigator/restorable_route_future.0.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}); @override Widget build(BuildContext context) { @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget { } class MyHome extends StatefulWidget { - const MyHome({Key? key}) : super(key: key); + const MyHome({super.key}); @override State createState() => _MyHomeState(); @@ -104,7 +104,7 @@ class _MyHomeState extends State with RestorationMixin { // Widget for the route pushed by the `RestorableRouteFuture`. class MyCounter extends StatefulWidget { - const MyCounter({Key? key, required this.title}) : super(key: key); + const MyCounter({super.key, required this.title}); final String title; diff --git a/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.0.dart b/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.0.dart index 14d616e8e4..5585b34d97 100644 --- a/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.0.dart +++ b/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.1.dart b/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.1.dart index 1dbae81913..00f11886c4 100644 --- a/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.1.dart +++ b/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.2.dart b/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.2.dart index bc6dd2f1f7..956dad0e1c 100644 --- a/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.2.dart +++ b/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.2.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view_state.0.dart b/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view_state.0.dart index 6ee0e5f859..0f70a18a60 100644 --- a/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view_state.0.dart +++ b/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view_state.0.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}); static const String _title = 'Flutter Code Sample'; @@ -25,7 +25,7 @@ class MyApp extends StatelessWidget { final GlobalKey globalKey = GlobalKey(); class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override @override diff --git a/examples/api/lib/widgets/notification_listener/notification.0.dart b/examples/api/lib/widgets/notification_listener/notification.0.dart index 461a108e73..4471a3e8ba 100644 --- a/examples/api/lib/widgets/notification_listener/notification.0.dart +++ b/examples/api/lib/widgets/notification_listener/notification.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); static const List _tabs = ['Months', 'Days']; static const List _months = [ diff --git a/examples/api/lib/widgets/overflow_bar/overflow_bar.0.dart b/examples/api/lib/widgets/overflow_bar/overflow_bar.0.dart index 9185c78037..24719ace2e 100644 --- a/examples/api/lib/widgets/overflow_bar/overflow_bar.0.dart +++ b/examples/api/lib/widgets/overflow_bar/overflow_bar.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart b/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart index 99e0198dc6..079d96bd78 100644 --- a/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart +++ b/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.1.dart b/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.1.dart index ba6b46b193..71accee45b 100644 --- a/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.1.dart +++ b/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/page_storage/page_storage.0.dart b/examples/api/lib/widgets/page_storage/page_storage.0.dart index bb7147d927..0efbbecef0 100644 --- a/examples/api/lib/widgets/page_storage/page_storage.0.dart +++ b/examples/api/lib/widgets/page_storage/page_storage.0.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}); @override Widget build(BuildContext context) { @@ -20,7 +20,7 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - const MyHomePage({Key? key}) : super(key: key); + const MyHomePage({super.key}); @override State createState() => _MyHomePageState(); @@ -71,7 +71,7 @@ class _MyHomePageState extends State { } class ColorBoxPage extends StatelessWidget { - const ColorBoxPage({Key? key}) : super(key: key); + const ColorBoxPage({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/page_view/page_view.0.dart b/examples/api/lib/widgets/page_view/page_view.0.dart index 798dbad3e6..04c5532bb5 100644 --- a/examples/api/lib/widgets/page_view/page_view.0.dart +++ b/examples/api/lib/widgets/page_view/page_view.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/preferred_size/preferred_size.0.dart b/examples/api/lib/widgets/preferred_size/preferred_size.0.dart index 47675d0322..59f4878449 100644 --- a/examples/api/lib/widgets/preferred_size/preferred_size.0.dart +++ b/examples/api/lib/widgets/preferred_size/preferred_size.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class AppBarContent extends StatelessWidget { - const AppBarContent({Key? key}) : super(key: key); + const AppBarContent({super.key}); @override Widget build(BuildContext context) { @@ -64,7 +64,7 @@ class AppBarContent extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/restoration/restoration_mixin.0.dart b/examples/api/lib/widgets/restoration/restoration_mixin.0.dart index 193ffddff2..e7444b2476 100644 --- a/examples/api/lib/widgets/restoration/restoration_mixin.0.dart +++ b/examples/api/lib/widgets/restoration/restoration_mixin.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const RestorationExampleApp()); class RestorationExampleApp extends StatelessWidget { - const RestorationExampleApp({Key? key}) : super(key: key); + const RestorationExampleApp({super.key}); @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class RestorationExampleApp extends StatelessWidget { } class RestorableCounter extends StatefulWidget { - const RestorableCounter({Key? key, this.restorationId}) : super(key: key); + const RestorableCounter({super.key, this.restorationId}); final String? restorationId; diff --git a/examples/api/lib/widgets/restoration_properties/restorable_value.0.dart b/examples/api/lib/widgets/restoration_properties/restorable_value.0.dart index ae1db295ba..5462d30818 100644 --- a/examples/api/lib/widgets/restoration_properties/restorable_value.0.dart +++ b/examples/api/lib/widgets/restoration_properties/restorable_value.0.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}); @override Widget build(BuildContext context) { @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key, this.restorationId}) : super(key: key); + const MyStatefulWidget({super.key, this.restorationId}); final String? restorationId; diff --git a/examples/api/lib/widgets/routes/show_general_dialog.0.dart b/examples/api/lib/widgets/routes/show_general_dialog.0.dart index 2b1a82fac4..a7287c15ea 100644 --- a/examples/api/lib/widgets/routes/show_general_dialog.0.dart +++ b/examples/api/lib/widgets/routes/show_general_dialog.0.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}); static const String _title = 'Flutter Code Sample'; @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/scroll_position/scroll_metrics_notification.0.dart b/examples/api/lib/widgets/scroll_position/scroll_metrics_notification.0.dart index 5f4925ff34..c5522cfa33 100644 --- a/examples/api/lib/widgets/scroll_position/scroll_metrics_notification.0.dart +++ b/examples/api/lib/widgets/scroll_position/scroll_metrics_notification.0.dart @@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const ScrollMetricsDemo()); class ScrollMetricsDemo extends StatefulWidget { - const ScrollMetricsDemo({Key? key}) : super(key: key); + const ScrollMetricsDemo({super.key}); @override State createState() => ScrollMetricsDemoState(); diff --git a/examples/api/lib/widgets/scroll_view/custom_scroll_view.1.dart b/examples/api/lib/widgets/scroll_view/custom_scroll_view.1.dart index bd05e866a5..0cf11bffee 100644 --- a/examples/api/lib/widgets/scroll_view/custom_scroll_view.1.dart +++ b/examples/api/lib/widgets/scroll_view/custom_scroll_view.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/scroll_view/listview_select.1.dart b/examples/api/lib/widgets/scroll_view/listview_select.1.dart index 342ee365e4..05dbe71f14 100644 --- a/examples/api/lib/widgets/scroll_view/listview_select.1.dart +++ b/examples/api/lib/widgets/scroll_view/listview_select.1.dart @@ -10,7 +10,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}); static const String _title = 'Flutter Code Sample'; @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget { } class ListTileSelectExample extends StatefulWidget { - const ListTileSelectExample({Key? key}) : super(key: key); + const ListTileSelectExample({super.key}); @override ListTileSelectExampleState createState() => ListTileSelectExampleState(); @@ -134,11 +134,11 @@ class ListTileSelectExampleState extends State { class GridBuilder extends StatefulWidget { const GridBuilder({ - Key? key, + super.key, required this.selectedList, required this.isSelectionMode, required this.onSelectionChange, - }) : super(key: key); + }); final bool isSelectionMode; final Function(bool)? onSelectionChange; @@ -189,11 +189,11 @@ class GridBuilderState extends State { class ListBuilder extends StatefulWidget { const ListBuilder({ - Key? key, + super.key, required this.selectedList, required this.isSelectionMode, required this.onSelectionChange, - }) : super(key: key); + }); final bool isSelectionMode; final List selectedList; diff --git a/examples/api/lib/widgets/scrollbar/raw_scrollbar.0.dart b/examples/api/lib/widgets/scrollbar/raw_scrollbar.0.dart index 1c2c20117b..5021ee4463 100644 --- a/examples/api/lib/widgets/scrollbar/raw_scrollbar.0.dart +++ b/examples/api/lib/widgets/scrollbar/raw_scrollbar.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/scrollbar/raw_scrollbar.1.dart b/examples/api/lib/widgets/scrollbar/raw_scrollbar.1.dart index 53214ea98a..c76ee33f68 100644 --- a/examples/api/lib/widgets/scrollbar/raw_scrollbar.1.dart +++ b/examples/api/lib/widgets/scrollbar/raw_scrollbar.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/scrollbar/raw_scrollbar.2.dart b/examples/api/lib/widgets/scrollbar/raw_scrollbar.2.dart index 40784c69ca..380cbaee1c 100644 --- a/examples/api/lib/widgets/scrollbar/raw_scrollbar.2.dart +++ b/examples/api/lib/widgets/scrollbar/raw_scrollbar.2.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/scrollbar/raw_scrollbar.shape.0.dart b/examples/api/lib/widgets/scrollbar/raw_scrollbar.shape.0.dart index 32a7a35db4..a0cce627ab 100644 --- a/examples/api/lib/widgets/scrollbar/raw_scrollbar.shape.0.dart +++ b/examples/api/lib/widgets/scrollbar/raw_scrollbar.shape.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/shared_app_data/shared_app_data.0.dart b/examples/api/lib/widgets/shared_app_data/shared_app_data.0.dart index 04a9d3e40c..7618a16434 100644 --- a/examples/api/lib/widgets/shared_app_data/shared_app_data.0.dart +++ b/examples/api/lib/widgets/shared_app_data/shared_app_data.0.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; class ShowSharedValue extends StatelessWidget { - const ShowSharedValue({ Key? key, required this.appDataKey }) : super(key: key); + const ShowSharedValue({ super.key, required this.appDataKey }); final String appDataKey; @@ -25,7 +25,7 @@ class ShowSharedValue extends StatelessWidget { // to be rebuilt. In this case that's the ShowSharedValue widget that's // displaying the value of a key whose value has been updated. class Home extends StatefulWidget { - const Home({ Key? key }) : super(key: key); + const Home({ super.key }); @override State createState() => _HomeState(); diff --git a/examples/api/lib/widgets/shared_app_data/shared_app_data.1.dart b/examples/api/lib/widgets/shared_app_data/shared_app_data.1.dart index 03bb83ba0a..6e203c4764 100644 --- a/examples/api/lib/widgets/shared_app_data/shared_app_data.1.dart +++ b/examples/api/lib/widgets/shared_app_data/shared_app_data.1.dart @@ -34,7 +34,7 @@ class SharedObject { // An example of a widget which depends on the SharedObject's value, // which might be provided - along with SharedObject - in a Dart package. class CustomWidget extends StatelessWidget { - const CustomWidget({ Key? key }) : super(key: key); + const CustomWidget({ super.key }); @override Widget build(BuildContext context) { @@ -49,7 +49,7 @@ class CustomWidget extends StatelessWidget { } class Home extends StatelessWidget { - const Home({ Key? key }) : super(key: key); + const Home({ super.key }); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/shortcuts/character_activator.0.dart b/examples/api/lib/widgets/shortcuts/character_activator.0.dart index bf05a3c6e4..e601467e01 100644 --- a/examples/api/lib/widgets/shortcuts/character_activator.0.dart +++ b/examples/api/lib/widgets/shortcuts/character_activator.0.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}); static const String _title = 'Flutter Code Sample'; @@ -32,7 +32,7 @@ class HelpMenuIntent extends Intent { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/shortcuts/logical_key_set.0.dart b/examples/api/lib/widgets/shortcuts/logical_key_set.0.dart index 241b03b1c6..106b9a488a 100644 --- a/examples/api/lib/widgets/shortcuts/logical_key_set.0.dart +++ b/examples/api/lib/widgets/shortcuts/logical_key_set.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -33,7 +33,7 @@ class IncrementIntent extends Intent { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/shortcuts/shortcuts.0.dart b/examples/api/lib/widgets/shortcuts/shortcuts.0.dart index c81217ab69..c6ccd5a6b0 100644 --- a/examples/api/lib/widgets/shortcuts/shortcuts.0.dart +++ b/examples/api/lib/widgets/shortcuts/shortcuts.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -37,7 +37,7 @@ class DecrementIntent extends Intent { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/shortcuts/shortcuts.1.dart b/examples/api/lib/widgets/shortcuts/shortcuts.1.dart index 6c640d9844..601ff40e85 100644 --- a/examples/api/lib/widgets/shortcuts/shortcuts.1.dart +++ b/examples/api/lib/widgets/shortcuts/shortcuts.1.dart @@ -10,7 +10,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -76,7 +76,7 @@ class DecrementAction extends Action { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/shortcuts/single_activator.single_activator.0.dart b/examples/api/lib/widgets/shortcuts/single_activator.single_activator.0.dart index 7ac1965c3d..8b21b3de61 100644 --- a/examples/api/lib/widgets/shortcuts/single_activator.single_activator.0.dart +++ b/examples/api/lib/widgets/shortcuts/single_activator.single_activator.0.dart @@ -10,7 +10,7 @@ import 'package:flutter/services.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -33,7 +33,7 @@ class IncrementIntent extends Intent { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.0.dart b/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.0.dart index 04782c1e75..b51163c16a 100644 --- a/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.0.dart +++ b/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.1.dart b/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.1.dart index 36aee6533e..07d94ad35c 100644 --- a/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.1.dart +++ b/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.1.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.0.dart b/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.0.dart index 5402261d77..192c0ec0af 100644 --- a/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.0.dart +++ b/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.0.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.1.dart b/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.1.dart index 93ba978393..163e3324c1 100644 --- a/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.1.dart +++ b/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.1.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.2.dart b/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.2.dart index 19ce28db60..b6df67a439 100644 --- a/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.2.dart +++ b/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.2.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.3.dart b/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.3.dart index 7f13009e20..906ab54734 100644 --- a/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.3.dart +++ b/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.3.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}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart b/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart index 7e89dc9282..ba10d06574 100644 --- a/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart +++ b/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart @@ -15,11 +15,11 @@ enum DiagonalSlot { /// by providing slots for two children that will be arranged diagonally. class Diagonal extends RenderObjectWidget with SlottedMultiChildRenderObjectWidgetMixin { const Diagonal({ - Key? key, + super.key, this.topLeft, this.bottomRight, this.backgroundColor, - }) : super(key: key); + }); final Widget? topLeft; final Widget? bottomRight; @@ -251,7 +251,7 @@ class RenderDiagonal extends RenderBox with SlottedContainerRenderObjectMixin runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); static const String _title = 'Flutter Code Sample'; @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyStatelessWidget extends StatelessWidget { - const MyStatelessWidget({Key? key}) : super(key: key); + const MyStatelessWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/examples/api/lib/widgets/transitions/align_transition.0.dart b/examples/api/lib/widgets/transitions/align_transition.0.dart index 3cfeda424d..138bd60538 100644 --- a/examples/api/lib/widgets/transitions/align_transition.0.dart +++ b/examples/api/lib/widgets/transitions/align_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/animated_builder.0.dart b/examples/api/lib/widgets/transitions/animated_builder.0.dart index 5054be3616..3128b26349 100644 --- a/examples/api/lib/widgets/transitions/animated_builder.0.dart +++ b/examples/api/lib/widgets/transitions/animated_builder.0.dart @@ -11,7 +11,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}); static const String _title = 'Flutter Code Sample'; @@ -25,7 +25,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/animated_widget.0.dart b/examples/api/lib/widgets/transitions/animated_widget.0.dart index d24fe121ec..958766d152 100644 --- a/examples/api/lib/widgets/transitions/animated_widget.0.dart +++ b/examples/api/lib/widgets/transitions/animated_widget.0.dart @@ -11,7 +11,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}); static const String _title = 'Flutter Code Sample'; @@ -26,9 +26,9 @@ class MyApp extends StatelessWidget { class SpinningContainer extends AnimatedWidget { const SpinningContainer({ - Key? key, + super.key, required AnimationController controller, - }) : super(key: key, listenable: controller); + }) : super(listenable: controller); Animation get _progress => listenable as Animation; @@ -42,7 +42,7 @@ class SpinningContainer extends AnimatedWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/decorated_box_transition.0.dart b/examples/api/lib/widgets/transitions/decorated_box_transition.0.dart index 5aa8641882..729610b4f1 100644 --- a/examples/api/lib/widgets/transitions/decorated_box_transition.0.dart +++ b/examples/api/lib/widgets/transitions/decorated_box_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/default_text_style_transition.0.dart b/examples/api/lib/widgets/transitions/default_text_style_transition.0.dart index 5c35aa03cf..c42cbff7ea 100644 --- a/examples/api/lib/widgets/transitions/default_text_style_transition.0.dart +++ b/examples/api/lib/widgets/transitions/default_text_style_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/fade_transition.0.dart b/examples/api/lib/widgets/transitions/fade_transition.0.dart index c2ab325025..e121c042be 100644 --- a/examples/api/lib/widgets/transitions/fade_transition.0.dart +++ b/examples/api/lib/widgets/transitions/fade_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/positioned_transition.0.dart b/examples/api/lib/widgets/transitions/positioned_transition.0.dart index ebaf2204bb..6d56d4f31e 100644 --- a/examples/api/lib/widgets/transitions/positioned_transition.0.dart +++ b/examples/api/lib/widgets/transitions/positioned_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/relative_positioned_transition.0.dart b/examples/api/lib/widgets/transitions/relative_positioned_transition.0.dart index b1edf2e1ae..32cb0d0b23 100644 --- a/examples/api/lib/widgets/transitions/relative_positioned_transition.0.dart +++ b/examples/api/lib/widgets/transitions/relative_positioned_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/rotation_transition.0.dart b/examples/api/lib/widgets/transitions/rotation_transition.0.dart index a9a3192102..930f288b1f 100644 --- a/examples/api/lib/widgets/transitions/rotation_transition.0.dart +++ b/examples/api/lib/widgets/transitions/rotation_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/scale_transition.0.dart b/examples/api/lib/widgets/transitions/scale_transition.0.dart index 97e5b52736..e5665f6a70 100644 --- a/examples/api/lib/widgets/transitions/scale_transition.0.dart +++ b/examples/api/lib/widgets/transitions/scale_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/size_transition.0.dart b/examples/api/lib/widgets/transitions/size_transition.0.dart index b7731a83a9..91435d3701 100644 --- a/examples/api/lib/widgets/transitions/size_transition.0.dart +++ b/examples/api/lib/widgets/transitions/size_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/slide_transition.0.dart b/examples/api/lib/widgets/transitions/slide_transition.0.dart index a7c550720c..5e27c777cb 100644 --- a/examples/api/lib/widgets/transitions/slide_transition.0.dart +++ b/examples/api/lib/widgets/transitions/slide_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/transitions/sliver_fade_transition.0.dart b/examples/api/lib/widgets/transitions/sliver_fade_transition.0.dart index 9d35ea32f5..5fac69653b 100644 --- a/examples/api/lib/widgets/transitions/sliver_fade_transition.0.dart +++ b/examples/api/lib/widgets/transitions/sliver_fade_transition.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/tween_animation_builder/tween_animation_builder.0.dart b/examples/api/lib/widgets/tween_animation_builder/tween_animation_builder.0.dart index 95be7d72e0..2e67e846d5 100644 --- a/examples/api/lib/widgets/tween_animation_builder/tween_animation_builder.0.dart +++ b/examples/api/lib/widgets/tween_animation_builder/tween_animation_builder.0.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}); static const String _title = 'Flutter Code Sample'; @@ -28,7 +28,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/examples/api/lib/widgets/will_pop_scope/will_pop_scope.0.dart b/examples/api/lib/widgets/will_pop_scope/will_pop_scope.0.dart index 5e39870ba5..cf7f37e288 100644 --- a/examples/api/lib/widgets/will_pop_scope/will_pop_scope.0.dart +++ b/examples/api/lib/widgets/will_pop_scope/will_pop_scope.0.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}); static const String _title = 'Flutter Code Sample'; @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget { } class MyStatefulWidget extends StatefulWidget { - const MyStatefulWidget({Key? key}) : super(key: key); + const MyStatefulWidget({super.key}); @override State createState() => _MyStatefulWidgetState(); diff --git a/packages/flutter/lib/src/animation/animation_controller.dart b/packages/flutter/lib/src/animation/animation_controller.dart index 635457bbfc..0bd969444c 100644 --- a/packages/flutter/lib/src/animation/animation_controller.dart +++ b/packages/flutter/lib/src/animation/animation_controller.dart @@ -135,7 +135,7 @@ enum AnimationBehavior { /// /// ```dart /// class Foo extends StatefulWidget { -/// const Foo({ Key? key, required this.duration }) : super(key: key); +/// const Foo({ super.key, required this.duration }); /// /// final Duration duration; /// diff --git a/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart b/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart index 99830ea271..fd59719f73 100644 --- a/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart +++ b/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart @@ -360,7 +360,7 @@ class CupertinoSlidingSegmentedControl extends StatefulWidget { /// /// ```dart /// class SegmentedControlExample extends StatefulWidget { - /// const SegmentedControlExample({Key? key}) : super(key: key); + /// const SegmentedControlExample({super.key}); /// /// @override /// State createState() => SegmentedControlExampleState(); diff --git a/packages/flutter/lib/src/material/chip.dart b/packages/flutter/lib/src/material/chip.dart index 4887f0a711..cbc65fa4e2 100644 --- a/packages/flutter/lib/src/material/chip.dart +++ b/packages/flutter/lib/src/material/chip.dart @@ -341,7 +341,7 @@ abstract class SelectableChipAttributes { /// /// ```dart /// class Wood extends StatefulWidget { - /// const Wood({Key? key}) : super(key: key); + /// const Wood({super.key}); /// /// @override /// State createState() => WoodState(); @@ -478,7 +478,7 @@ abstract class TappableChipAttributes { /// /// ```dart /// class Blacksmith extends StatelessWidget { - /// const Blacksmith({Key? key}) : super(key: key); + /// const Blacksmith({super.key}); /// /// void startHammering() { /// print('bang bang bang'); diff --git a/packages/flutter/lib/src/material/chip_choice.dart b/packages/flutter/lib/src/material/chip_choice.dart index da2f7be0b1..791049ff1b 100644 --- a/packages/flutter/lib/src/material/chip_choice.dart +++ b/packages/flutter/lib/src/material/chip_choice.dart @@ -21,7 +21,7 @@ import 'theme_data.dart'; /// /// ```dart /// class MyThreeOptions extends StatefulWidget { -/// const MyThreeOptions({Key? key}) : super(key: key); +/// const MyThreeOptions({super.key}); /// /// @override /// State createState() => _MyThreeOptionsState(); diff --git a/packages/flutter/lib/src/material/chip_filter.dart b/packages/flutter/lib/src/material/chip_filter.dart index f266ebc6e8..bb108688a1 100644 --- a/packages/flutter/lib/src/material/chip_filter.dart +++ b/packages/flutter/lib/src/material/chip_filter.dart @@ -28,7 +28,7 @@ import 'theme_data.dart'; /// } /// /// class CastFilter extends StatefulWidget { -/// const CastFilter({Key? key}) : super(key: key); +/// const CastFilter({super.key}); /// /// @override /// State createState() => CastFilterState(); diff --git a/packages/flutter/lib/src/material/chip_theme.dart b/packages/flutter/lib/src/material/chip_theme.dart index 8a11b3b7bc..364ea0f3b1 100644 --- a/packages/flutter/lib/src/material/chip_theme.dart +++ b/packages/flutter/lib/src/material/chip_theme.dart @@ -64,7 +64,7 @@ class ChipTheme extends InheritedTheme { /// /// ```dart /// class Spaceship extends StatelessWidget { - /// const Spaceship({Key? key}) : super(key: key); + /// const Spaceship({super.key}); /// /// @override /// Widget build(BuildContext context) { @@ -123,7 +123,7 @@ class ChipTheme extends InheritedTheme { /// /// ```dart /// class CarColor extends StatefulWidget { -/// const CarColor({Key? key}) : super(key: key); +/// const CarColor({super.key}); /// /// @override /// State createState() => _CarColorState(); diff --git a/packages/flutter/lib/src/material/feedback.dart b/packages/flutter/lib/src/material/feedback.dart index 49ee6916df..bb00b3f939 100644 --- a/packages/flutter/lib/src/material/feedback.dart +++ b/packages/flutter/lib/src/material/feedback.dart @@ -32,7 +32,7 @@ import 'theme.dart'; /// /// ```dart /// class WidgetWithWrappedHandler extends StatelessWidget { -/// const WidgetWithWrappedHandler({Key? key}) : super(key: key); +/// const WidgetWithWrappedHandler({super.key}); /// /// @override /// Widget build(BuildContext context) { @@ -60,7 +60,7 @@ import 'theme.dart'; /// /// ```dart /// class WidgetWithExplicitCall extends StatelessWidget { -/// const WidgetWithExplicitCall({Key? key}) : super(key: key); +/// const WidgetWithExplicitCall({super.key}); /// /// @override /// Widget build(BuildContext context) { diff --git a/packages/flutter/lib/src/material/material_state_mixin.dart b/packages/flutter/lib/src/material/material_state_mixin.dart index 9e8aadf45c..24b871edd6 100644 --- a/packages/flutter/lib/src/material/material_state_mixin.dart +++ b/packages/flutter/lib/src/material/material_state_mixin.dart @@ -24,7 +24,7 @@ import 'material_state.dart'; /// /// ```dart /// class MyWidget extends StatefulWidget { -/// const MyWidget({required this.color, required this.child, Key? key}) : super(key: key); +/// const MyWidget({super.key, required this.color, required this.child}); /// /// final MaterialStateColor color; /// final Widget child; @@ -76,7 +76,7 @@ mixin MaterialStateMixin on State { /// /// ```dart /// class MyWidget extends StatefulWidget { - /// const MyWidget({this.onPressed, Key? key}) : super(key: key); + /// const MyWidget({super.key, this.onPressed}); /// /// /// Something important this widget must do when pressed. /// final VoidCallback? onPressed; diff --git a/packages/flutter/lib/src/material/slider_theme.dart b/packages/flutter/lib/src/material/slider_theme.dart index 96efbbd0b0..1bfb0979fd 100644 --- a/packages/flutter/lib/src/material/slider_theme.dart +++ b/packages/flutter/lib/src/material/slider_theme.dart @@ -70,7 +70,7 @@ class SliderTheme extends InheritedTheme { /// /// ```dart /// class Launch extends StatefulWidget { - /// const Launch({Key? key}) : super(key: key); + /// const Launch({super.key}); /// /// @override /// State createState() => LaunchState(); @@ -240,7 +240,7 @@ class SliderThemeData with Diagnosticable { /// /// ```dart /// class Blissful extends StatefulWidget { - /// const Blissful({Key? key}) : super(key: key); + /// const Blissful({super.key}); /// /// @override /// State createState() => BlissfulState(); diff --git a/packages/flutter/lib/src/material/tab_controller.dart b/packages/flutter/lib/src/material/tab_controller.dart index da46aea455..ae8f1652dd 100644 --- a/packages/flutter/lib/src/material/tab_controller.dart +++ b/packages/flutter/lib/src/material/tab_controller.dart @@ -32,7 +32,7 @@ import 'constants.dart'; /// /// ```dart /// class MyTabbedPage extends StatefulWidget { -/// const MyTabbedPage({ Key? key }) : super(key: key); +/// const MyTabbedPage({ super.key }); /// @override /// State createState() => _MyTabbedPageState(); /// } diff --git a/packages/flutter/lib/src/material/text_theme.dart b/packages/flutter/lib/src/material/text_theme.dart index 8c26fdc724..0633542921 100644 --- a/packages/flutter/lib/src/material/text_theme.dart +++ b/packages/flutter/lib/src/material/text_theme.dart @@ -289,7 +289,7 @@ class TextTheme with Diagnosticable { /// /// A Widget that sets the ambient theme's title text color for its /// /// descendants, while leaving other ambient theme attributes alone. /// class TitleColorThemeCopy extends StatelessWidget { - /// const TitleColorThemeCopy({Key? key, required this.child, required this.titleColor}) : super(key: key); + /// const TitleColorThemeCopy({super.key, required this.titleColor, required this.child}); /// /// final Color titleColor; /// final Widget child; @@ -399,7 +399,7 @@ class TextTheme with Diagnosticable { /// /// A Widget that sets the ambient theme's title text color for its /// /// descendants, while leaving other ambient theme attributes alone. /// class TitleColorTheme extends StatelessWidget { - /// const TitleColorTheme({Key? key, required this.child, required this.titleColor}) : super(key: key); + /// const TitleColorTheme({super.key, required this.child, required this.titleColor}); /// /// final Color titleColor; /// final Widget child; diff --git a/packages/flutter/lib/src/painting/image_cache.dart b/packages/flutter/lib/src/painting/image_cache.dart index 3aff430996..f2068ae0f2 100644 --- a/packages/flutter/lib/src/painting/image_cache.dart +++ b/packages/flutter/lib/src/painting/image_cache.dart @@ -68,7 +68,7 @@ const int _kDefaultSizeBytes = 100 << 20; // 100 MiB /// } /// /// class MyApp extends StatelessWidget { -/// const MyApp({Key? key}) : super(key: key); +/// const MyApp({super.key}); /// /// @override /// Widget build(BuildContext context) { diff --git a/packages/flutter/lib/src/painting/image_provider.dart b/packages/flutter/lib/src/painting/image_provider.dart index 0d5f1cef38..82c5ba38ec 100644 --- a/packages/flutter/lib/src/painting/image_provider.dart +++ b/packages/flutter/lib/src/painting/image_provider.dart @@ -234,9 +234,9 @@ typedef DecoderCallback = Future Function(Uint8List bytes, {int? cache /// ```dart /// class MyImage extends StatefulWidget { /// const MyImage({ -/// Key? key, +/// super.key, /// required this.imageProvider, -/// }) : super(key: key); +/// }); /// /// final ImageProvider imageProvider; /// @@ -515,9 +515,9 @@ abstract class ImageProvider { /// ```dart /// class MyWidget extends StatelessWidget { /// const MyWidget({ - /// Key? key, + /// super.key, /// this.url = ' ... ', - /// }) : super(key: key); + /// }); /// /// final String url; /// diff --git a/packages/flutter/lib/src/painting/image_resolution.dart b/packages/flutter/lib/src/painting/image_resolution.dart index 33b02859ef..33d2800632 100644 --- a/packages/flutter/lib/src/painting/image_resolution.dart +++ b/packages/flutter/lib/src/painting/image_resolution.dart @@ -126,9 +126,9 @@ const double _kLowDprLimit = 2.0; /// ```dart /// class MyImage extends StatefulWidget { /// const MyImage({ -/// Key? key, +/// super.key, /// required this.assetImage, -/// }) : super(key: key); +/// }); /// /// final AssetImage assetImage; /// diff --git a/packages/flutter/lib/src/painting/text_span.dart b/packages/flutter/lib/src/painting/text_span.dart index 8c93d035ce..83790fb139 100644 --- a/packages/flutter/lib/src/painting/text_span.dart +++ b/packages/flutter/lib/src/painting/text_span.dart @@ -124,7 +124,7 @@ class TextSpan extends InlineSpan implements HitTestTarget, MouseTrackerAnnotati /// /// ```dart /// class BuzzingText extends StatefulWidget { - /// const BuzzingText({Key? key}) : super(key: key); + /// const BuzzingText({super.key}); /// /// @override /// State createState() => _BuzzingTextState(); diff --git a/packages/flutter/lib/src/rendering/proxy_box.dart b/packages/flutter/lib/src/rendering/proxy_box.dart index 6182216e5d..080c892748 100644 --- a/packages/flutter/lib/src/rendering/proxy_box.dart +++ b/packages/flutter/lib/src/rendering/proxy_box.dart @@ -3295,7 +3295,7 @@ class RenderRepaintBoundary extends RenderProxyBox { /// /// ```dart /// class PngHome extends StatefulWidget { - /// const PngHome({Key? key}) : super(key: key); + /// const PngHome({super.key}); /// /// @override /// State createState() => _PngHomeState(); diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index c07bbb96ec..85337ee482 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -71,7 +71,7 @@ export 'package:flutter/services.dart' show AssetBundle; // Examples can assume: -// class TestWidget extends StatelessWidget { const TestWidget({Key? key}) : super(key: key); @override Widget build(BuildContext context) => const Placeholder(); } +// class TestWidget extends StatelessWidget { const TestWidget({super.key}); @override Widget build(BuildContext context) => const Placeholder(); } // late WidgetTester tester; // late bool _visible; // class Sky extends CustomPainter { @override void paint(Canvas c, Size s) {} @override bool shouldRepaint(Sky s) => false; } diff --git a/packages/flutter/lib/src/widgets/binding.dart b/packages/flutter/lib/src/widgets/binding.dart index 6ba28b0f76..52d42c3b92 100644 --- a/packages/flutter/lib/src/widgets/binding.dart +++ b/packages/flutter/lib/src/widgets/binding.dart @@ -103,7 +103,7 @@ abstract class WidgetsBindingObserver { /// /// ```dart /// class MetricsReactor extends StatefulWidget { - /// const MetricsReactor({ Key? key }) : super(key: key); + /// const MetricsReactor({ super.key }); /// /// @override /// State createState() => _MetricsReactorState(); @@ -161,7 +161,7 @@ abstract class WidgetsBindingObserver { /// /// ```dart /// class TextScaleFactorReactor extends StatefulWidget { - /// const TextScaleFactorReactor({ Key? key }) : super(key: key); + /// const TextScaleFactorReactor({ super.key }); /// /// @override /// State createState() => _TextScaleFactorReactorState(); diff --git a/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart b/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart index 32ad53b7bf..ca4512ff23 100644 --- a/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart +++ b/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart @@ -68,7 +68,7 @@ import 'text_editing_intents.dart'; /// class DecrementCounterIntent extends Intent {} /// /// class MyWidget extends StatefulWidget { -/// const MyWidget({ Key? key }) : super(key: key); +/// const MyWidget({ super.key }); /// /// @override /// MyWidgetState createState() => MyWidgetState(); diff --git a/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart b/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart index a600a9cd08..96536ce982 100644 --- a/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart +++ b/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart @@ -247,7 +247,7 @@ class DraggableScrollableController extends ChangeNotifier { /// /// ```dart /// class HomePage extends StatelessWidget { -/// const HomePage({Key? key}) : super(key: key); +/// const HomePage({super.key}); /// /// @override /// Widget build(BuildContext context) { diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index df466541ea..6488865a3c 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -34,7 +34,7 @@ export 'package:flutter/rendering.dart' show RenderObject, RenderBox, debugDumpR // late BuildContext context; // void setState(VoidCallback fn) { } // abstract class RenderFrogJar extends RenderObject { } -// abstract class FrogJar extends RenderObjectWidget { const FrogJar({Key? key}) : super(key: key); } +// abstract class FrogJar extends RenderObjectWidget { const FrogJar({super.key}); } // abstract class FrogJarParentData extends ParentData { late Size size; } // An annotation used by test_analysis package to verify patterns are followed @@ -458,7 +458,7 @@ abstract class Widget extends DiagnosticableTree { /// /// ```dart /// class GreenFrog extends StatelessWidget { -/// const GreenFrog({ Key? key }) : super(key: key); +/// const GreenFrog({ super.key }); /// /// @override /// Widget build(BuildContext context) { @@ -476,10 +476,10 @@ abstract class Widget extends DiagnosticableTree { /// ```dart /// class Frog extends StatelessWidget { /// const Frog({ -/// Key? key, +/// super.key, /// this.color = const Color(0xFF2DBD3A), /// this.child, -/// }) : super(key: key); +/// }); /// /// final Color color; /// final Widget? child; @@ -682,7 +682,7 @@ abstract class StatelessWidget extends Widget { /// /// ```dart /// class YellowBird extends StatefulWidget { -/// const YellowBird({ Key? key }) : super(key: key); +/// const YellowBird({ super.key }); /// /// @override /// State createState() => _YellowBirdState(); @@ -705,10 +705,10 @@ abstract class StatelessWidget extends Widget { /// ```dart /// class Bird extends StatefulWidget { /// const Bird({ -/// Key? key, +/// super.key, /// this.color = const Color(0xFFFFE306), /// this.child, -/// }) : super(key: key); +/// }); /// /// final Color color; /// final Widget? child; @@ -1408,10 +1408,10 @@ abstract class ProxyWidget extends Widget { /// ```dart /// class FrogSize extends ParentDataWidget { /// const FrogSize({ -/// Key? key, +/// super.key, /// required this.size, -/// required Widget child, -/// }) : super(key: key, child: child); +/// required super.child, +/// }); /// /// final Size size; /// @@ -1557,10 +1557,10 @@ abstract class ParentDataWidget extends ProxyWidget { /// ```dart /// class FrogColor extends InheritedWidget { /// const FrogColor({ -/// Key? key, +/// super.key, /// required this.color, -/// required Widget child, -/// }) : super(key: key, child: child); +/// required super.child, +/// }); /// /// final Color color; /// @@ -1608,7 +1608,7 @@ abstract class ParentDataWidget extends ProxyWidget { /// /// ```dart /// class MyPage extends StatelessWidget { -/// const MyPage({Key? key}) : super(key: key); +/// const MyPage({super.key}); /// /// @override /// Widget build(BuildContext context) { @@ -1637,7 +1637,7 @@ abstract class ParentDataWidget extends ProxyWidget { /// /// ```dart /// class MyOtherPage extends StatelessWidget { -/// const MyOtherPage({Key? key}) : super(key: key); +/// const MyOtherPage({super.key}); /// /// @override /// Widget build(BuildContext context) { diff --git a/packages/flutter/lib/src/widgets/gesture_detector.dart b/packages/flutter/lib/src/widgets/gesture_detector.dart index aaffe0df33..dc5fb7fa99 100644 --- a/packages/flutter/lib/src/widgets/gesture_detector.dart +++ b/packages/flutter/lib/src/widgets/gesture_detector.dart @@ -1272,10 +1272,10 @@ class RawGestureDetector extends StatefulWidget { /// ```dart /// class ForcePressGestureDetectorWithSemantics extends StatelessWidget { /// const ForcePressGestureDetectorWithSemantics({ - /// Key? key, + /// super.key, /// required this.child, /// required this.onForcePress, - /// }) : super(key: key); + /// }); /// /// final Widget child; /// final VoidCallback onForcePress; diff --git a/packages/flutter/lib/src/widgets/implicit_animations.dart b/packages/flutter/lib/src/widgets/implicit_animations.dart index 1454d872fc..56665362ca 100644 --- a/packages/flutter/lib/src/widgets/implicit_animations.dart +++ b/packages/flutter/lib/src/widgets/implicit_animations.dart @@ -18,7 +18,7 @@ import 'transitions.dart'; // Examples can assume: // class MyWidget extends ImplicitlyAnimatedWidget { -// const MyWidget({Key? key, this.targetColor = Colors.black}) : super(key: key, duration: const Duration(seconds: 1)); +// const MyWidget({super.key, this.targetColor = Colors.black}) : super(duration: const Duration(seconds: 1)); // final Color targetColor; // @override // MyWidgetState createState() => MyWidgetState(); @@ -1300,7 +1300,7 @@ class _AnimatedPositionedDirectionalState extends AnimatedWidgetBaseState createState() => LogoScaleState(); @@ -1430,7 +1430,7 @@ class _AnimatedScaleState extends ImplicitlyAnimatedWidgetState { /// /// ```dart /// class LogoRotate extends StatefulWidget { -/// const LogoRotate({Key? key}) : super(key: key); +/// const LogoRotate({super.key}); /// /// @override /// State createState() => LogoRotateState(); @@ -1642,7 +1642,7 @@ class _AnimatedSlideState extends ImplicitlyAnimatedWidgetState { /// /// ```dart /// class LogoFade extends StatefulWidget { -/// const LogoFade({Key? key}) : super(key: key); +/// const LogoFade({super.key}); /// /// @override /// State createState() => LogoFadeState(); diff --git a/packages/flutter/lib/src/widgets/navigator.dart b/packages/flutter/lib/src/widgets/navigator.dart index f9c8245f83..915b0c5248 100644 --- a/packages/flutter/lib/src/widgets/navigator.dart +++ b/packages/flutter/lib/src/widgets/navigator.dart @@ -26,8 +26,8 @@ import 'routes.dart'; import 'ticker_provider.dart'; // Examples can assume: -// class MyPage extends Placeholder { const MyPage({Key? key}) : super(key: key); } -// class MyHomePage extends Placeholder { const MyHomePage({Key? key}) : super(key: key); } +// class MyPage extends Placeholder { const MyPage({super.key}); } +// class MyHomePage extends Placeholder { const MyHomePage({super.key}); } // late NavigatorState navigator; // late BuildContext context; diff --git a/packages/flutter/lib/src/widgets/page_view.dart b/packages/flutter/lib/src/widgets/page_view.dart index 8e8400b96e..ee27b4038a 100644 --- a/packages/flutter/lib/src/widgets/page_view.dart +++ b/packages/flutter/lib/src/widgets/page_view.dart @@ -46,7 +46,7 @@ import 'viewport.dart'; /// /// ```dart /// class MyPageView extends StatefulWidget { -/// const MyPageView({Key? key}) : super(key: key); +/// const MyPageView({super.key}); /// /// @override /// State createState() => _MyPageViewState(); @@ -699,7 +699,7 @@ class PageView extends StatefulWidget { /// /// ```dart /// class MyPageView extends StatefulWidget { - /// const MyPageView({Key? key}) : super(key: key); + /// const MyPageView({super.key}); /// /// @override /// State createState() => _MyPageViewState(); @@ -751,7 +751,7 @@ class PageView extends StatefulWidget { /// } /// /// class KeepAlive extends StatefulWidget { - /// const KeepAlive({Key? key, required this.data}) : super(key: key); + /// const KeepAlive({super.key, required this.data}); /// /// final String data; /// diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart index 99fa2ea35f..069548b7ed 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart @@ -31,7 +31,7 @@ import 'transitions.dart'; // late NavigatorState navigator; // late BuildContext context; // Future askTheUserIfTheyAreSure() async { return true; } -// abstract class MyWidget extends StatefulWidget { const MyWidget({Key? key}) : super(key: key); } +// abstract class MyWidget extends StatefulWidget { const MyWidget({super.key}); } /// A route that displays widgets in the [Navigator]'s [Overlay]. abstract class OverlayRoute extends Route { @@ -515,7 +515,7 @@ mixin LocalHistoryRoute on Route { /// /// ```dart /// class App extends StatelessWidget { - /// const App({Key? key}) : super(key: key); + /// const App({super.key}); /// /// @override /// Widget build(BuildContext context) { @@ -530,7 +530,7 @@ mixin LocalHistoryRoute on Route { /// } /// /// class HomePage extends StatefulWidget { - /// const HomePage({Key? key}) : super(key: key); + /// const HomePage({super.key}); /// /// @override /// State createState() => _HomePageState(); @@ -560,7 +560,7 @@ mixin LocalHistoryRoute on Route { /// } /// /// class SecondPage extends StatefulWidget { - /// const SecondPage({Key? key}) : super(key: key); + /// const SecondPage({super.key}); /// /// @override /// State createState() => _SecondPageState(); @@ -1734,7 +1734,7 @@ abstract class PopupRoute extends ModalRoute { /// } /// /// class RouteAwareWidget extends StatefulWidget { -/// const RouteAwareWidget({Key? key}) : super(key: key); +/// const RouteAwareWidget({super.key}); /// /// @override /// State createState() => RouteAwareWidgetState(); diff --git a/packages/flutter/lib/src/widgets/scroll_physics.dart b/packages/flutter/lib/src/widgets/scroll_physics.dart index c7f03a8db9..6ce2fe6503 100644 --- a/packages/flutter/lib/src/widgets/scroll_physics.dart +++ b/packages/flutter/lib/src/widgets/scroll_physics.dart @@ -18,14 +18,14 @@ export 'package:flutter/physics.dart' show Simulation, ScrollSpringSimulation, T // Examples can assume: // class FooScrollPhysics extends ScrollPhysics { -// const FooScrollPhysics({ ScrollPhysics? parent }): super(parent: parent); +// const FooScrollPhysics({ super.parent }); // @override // FooScrollPhysics applyTo(ScrollPhysics? ancestor) { // return FooScrollPhysics(parent: buildParent(ancestor)); // } // } // class BarScrollPhysics extends ScrollPhysics { -// const BarScrollPhysics({ ScrollPhysics? parent }): super(parent: parent); +// const BarScrollPhysics({ super.parent }); // } /// Determines the physics of a [Scrollable] widget. diff --git a/packages/flutter/lib/src/widgets/scroll_view.dart b/packages/flutter/lib/src/widgets/scroll_view.dart index a81cae277d..468e515dd6 100644 --- a/packages/flutter/lib/src/widgets/scroll_view.dart +++ b/packages/flutter/lib/src/widgets/scroll_view.dart @@ -1252,7 +1252,7 @@ class ListView extends BoxScrollView { /// /// ```dart /// class MyListView extends StatefulWidget { - /// const MyListView({Key? key}) : super(key: key); + /// const MyListView({super.key}); /// /// @override /// State createState() => _MyListViewState(); diff --git a/packages/flutter/lib/src/widgets/value_listenable_builder.dart b/packages/flutter/lib/src/widgets/value_listenable_builder.dart index 262f5b8a73..76cd987928 100644 --- a/packages/flutter/lib/src/widgets/value_listenable_builder.dart +++ b/packages/flutter/lib/src/widgets/value_listenable_builder.dart @@ -47,7 +47,7 @@ typedef ValueWidgetBuilder = Widget Function(BuildContext context, T value, W /// /// ```dart /// class MyHomePage extends StatefulWidget { -/// const MyHomePage({Key? key, required this.title}) : super(key: key); +/// const MyHomePage({super.key, required this.title}); /// final String title; /// /// @override