From a1432a9c5da2f2fef9241d9f6d3f6b3a69bc918b Mon Sep 17 00:00:00 2001 From: Kate Lovett Date: Mon, 7 Nov 2022 19:17:03 -0600 Subject: [PATCH] Refactor fix_data.yaml (#114192) * Refactor fix_data.yaml * ++ * lib, not lib/src * Nit * Nit * Update packages/flutter/test_fixes/material/app_bar_theme.dart Co-authored-by: Alexander Dahlberg * Fix copy paste errors Co-authored-by: Alexander Dahlberg --- packages/flutter/lib/fix_data.yaml | 5665 ----------------- packages/flutter/lib/fix_data/README.md | 43 + .../flutter/lib/fix_data/fix_cupertino.yaml | 298 + .../flutter/lib/fix_data/fix_gestures.yaml | 478 ++ .../fix_data/fix_material/fix_app_bar.yaml | 150 + .../fix_material/fix_app_bar_theme.yaml | 246 + .../fix_material/fix_color_scheme.yaml | 129 + .../fix_data/fix_material/fix_material.yaml | 900 +++ .../fix_material/fix_sliver_app_bar.yaml | 150 + .../fix_data/fix_material/fix_text_theme.yaml | 455 ++ .../fix_data/fix_material/fix_theme_data.yaml | 1690 +++++ .../flutter/lib/fix_data/fix_rendering.yaml | 113 + .../flutter/lib/fix_data/fix_services.yaml | 73 + .../flutter/lib/fix_data/fix_template.yaml | 24 + .../lib/fix_data/fix_widgets/fix_actions.yaml | 83 + .../fix_widgets/fix_build_context.yaml | 169 + .../lib/fix_data/fix_widgets/fix_element.yaml | 169 + .../fix_list_wheel_scroll_view.yaml | 107 + .../lib/fix_data/fix_widgets/fix_widgets.yaml | 845 +++ packages/flutter/test_fixes/README.md | 24 +- .../test_fixes/{ => cupertino}/cupertino.dart | 0 .../{ => cupertino}/cupertino.dart.expect | 0 .../test_fixes/{ => gestures}/gestures.dart | 0 .../{ => gestures}/gestures.dart.expect | 0 packages/flutter/test_fixes/material.dart | 710 --- .../flutter/test_fixes/material.dart.expect | 914 --- .../flutter/test_fixes/material/app_bar.dart | 24 + .../test_fixes/material/app_bar.dart.expect | 25 + .../test_fixes/material/app_bar_theme.dart | 34 + .../material/app_bar_theme.dart.expect | 35 + .../test_fixes/material/color_scheme.dart | 18 + .../material/color_scheme.dart.expect | 18 + .../flutter/test_fixes/material/material.dart | 310 + .../test_fixes/material/material.dart.expect | 306 + .../test_fixes/material/sliver_app_bar.dart | 23 + .../material/sliver_app_bar.dart.expect | 24 + .../test_fixes/material/text_theme.dart | 111 + .../material/text_theme.dart.expect | 111 + .../test_fixes/material/theme_data.dart | 237 + .../material/theme_data.dart.expect | 443 ++ .../test_fixes/{ => rendering}/rendering.dart | 0 .../{ => rendering}/rendering.dart.expect | 0 .../test_fixes/{ => services}/services.dart | 0 .../{ => services}/services.dart.expect | 0 .../flutter/test_fixes/widgets/actions.dart | 18 + .../test_fixes/widgets/actions.dart.expect | 18 + .../test_fixes/widgets/build_context.dart | 17 + .../widgets/build_context.dart.expect | 17 + .../flutter/test_fixes/widgets/element.dart | 17 + .../test_fixes/widgets/element.dart.expect | 17 + .../widgets/list_wheel_scroll_view.dart | 18 + .../list_wheel_scroll_view.dart.expect | 18 + .../test_fixes/{ => widgets}/widgets.dart | 38 - .../{ => widgets}/widgets.dart.expect | 38 - 54 files changed, 7996 insertions(+), 7374 deletions(-) delete mode 100644 packages/flutter/lib/fix_data.yaml create mode 100644 packages/flutter/lib/fix_data/README.md create mode 100644 packages/flutter/lib/fix_data/fix_cupertino.yaml create mode 100644 packages/flutter/lib/fix_data/fix_gestures.yaml create mode 100644 packages/flutter/lib/fix_data/fix_material/fix_app_bar.yaml create mode 100644 packages/flutter/lib/fix_data/fix_material/fix_app_bar_theme.yaml create mode 100644 packages/flutter/lib/fix_data/fix_material/fix_color_scheme.yaml create mode 100644 packages/flutter/lib/fix_data/fix_material/fix_material.yaml create mode 100644 packages/flutter/lib/fix_data/fix_material/fix_sliver_app_bar.yaml create mode 100644 packages/flutter/lib/fix_data/fix_material/fix_text_theme.yaml create mode 100644 packages/flutter/lib/fix_data/fix_material/fix_theme_data.yaml create mode 100644 packages/flutter/lib/fix_data/fix_rendering.yaml create mode 100644 packages/flutter/lib/fix_data/fix_services.yaml create mode 100644 packages/flutter/lib/fix_data/fix_template.yaml create mode 100644 packages/flutter/lib/fix_data/fix_widgets/fix_actions.yaml create mode 100644 packages/flutter/lib/fix_data/fix_widgets/fix_build_context.yaml create mode 100644 packages/flutter/lib/fix_data/fix_widgets/fix_element.yaml create mode 100644 packages/flutter/lib/fix_data/fix_widgets/fix_list_wheel_scroll_view.yaml create mode 100644 packages/flutter/lib/fix_data/fix_widgets/fix_widgets.yaml rename packages/flutter/test_fixes/{ => cupertino}/cupertino.dart (100%) rename packages/flutter/test_fixes/{ => cupertino}/cupertino.dart.expect (100%) rename packages/flutter/test_fixes/{ => gestures}/gestures.dart (100%) rename packages/flutter/test_fixes/{ => gestures}/gestures.dart.expect (100%) delete mode 100644 packages/flutter/test_fixes/material.dart delete mode 100644 packages/flutter/test_fixes/material.dart.expect create mode 100644 packages/flutter/test_fixes/material/app_bar.dart create mode 100644 packages/flutter/test_fixes/material/app_bar.dart.expect create mode 100644 packages/flutter/test_fixes/material/app_bar_theme.dart create mode 100644 packages/flutter/test_fixes/material/app_bar_theme.dart.expect create mode 100644 packages/flutter/test_fixes/material/color_scheme.dart create mode 100644 packages/flutter/test_fixes/material/color_scheme.dart.expect create mode 100644 packages/flutter/test_fixes/material/material.dart create mode 100644 packages/flutter/test_fixes/material/material.dart.expect create mode 100644 packages/flutter/test_fixes/material/sliver_app_bar.dart create mode 100644 packages/flutter/test_fixes/material/sliver_app_bar.dart.expect create mode 100644 packages/flutter/test_fixes/material/text_theme.dart create mode 100644 packages/flutter/test_fixes/material/text_theme.dart.expect create mode 100644 packages/flutter/test_fixes/material/theme_data.dart create mode 100644 packages/flutter/test_fixes/material/theme_data.dart.expect rename packages/flutter/test_fixes/{ => rendering}/rendering.dart (100%) rename packages/flutter/test_fixes/{ => rendering}/rendering.dart.expect (100%) rename packages/flutter/test_fixes/{ => services}/services.dart (100%) rename packages/flutter/test_fixes/{ => services}/services.dart.expect (100%) create mode 100644 packages/flutter/test_fixes/widgets/actions.dart create mode 100644 packages/flutter/test_fixes/widgets/actions.dart.expect create mode 100644 packages/flutter/test_fixes/widgets/build_context.dart create mode 100644 packages/flutter/test_fixes/widgets/build_context.dart.expect create mode 100644 packages/flutter/test_fixes/widgets/element.dart create mode 100644 packages/flutter/test_fixes/widgets/element.dart.expect create mode 100644 packages/flutter/test_fixes/widgets/list_wheel_scroll_view.dart create mode 100644 packages/flutter/test_fixes/widgets/list_wheel_scroll_view.dart.expect rename packages/flutter/test_fixes/{ => widgets}/widgets.dart (78%) rename packages/flutter/test_fixes/{ => widgets}/widgets.dart.expect (79%) diff --git a/packages/flutter/lib/fix_data.yaml b/packages/flutter/lib/fix_data.yaml deleted file mode 100644 index b491b4dfc49e..000000000000 --- a/packages/flutter/lib/fix_data.yaml +++ /dev/null @@ -1,5665 +0,0 @@ -# Copyright 2014 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# For details regarding the *Flutter Fix* feature, see -# https://flutter.dev/docs/development/tools/flutter-fix - -# Please add new fixes to the top of the file, separated by one blank line -# from other fixes. In a comment, include a link to the PR where the change -# requiring the fix was made. - -# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md -# file for instructions on testing these data driven fixes. - -# For documentation about this file format, see -# https://dart.dev/go/data-driven-fixes. - -version: 1 -transforms: - # Changes made in https://github.com/flutter/flutter/pull/78588 - - title: "Migrate to 'buildOverscrollIndicator'" - date: 2021-03-18 - element: - uris: ['widgets.dart', 'material.dart', 'cupertino.dart'] - method: 'buildViewportChrome' - inClass: 'ScrollBehavior' - changes: - - kind: 'rename' - newName: 'buildOverscrollIndicator' - - # Changes made in https://github.com/flutter/flutter/pull/78588 - - title: "Migrate to 'buildOverscrollIndicator'" - date: 2021-03-18 - element: - uris: ['material.dart'] - method: 'buildViewportChrome' - inClass: 'MaterialScrollBehavior' - changes: - - kind: 'rename' - newName: 'buildOverscrollIndicator' - - # Changes made in https://github.com/flutter/flutter/pull/78588 - - title: "Migrate to 'buildOverscrollIndicator'" - date: 2021-03-18 - element: - uris: ['cupertino.dart'] - method: 'buildViewportChrome' - inClass: 'CupertinoScrollBehavior' - changes: - - kind: 'rename' - newName: 'buildOverscrollIndicator' - - # Changes made in https://github.com/flutter/flutter/pull/111706 - - title: "Migrate to 'trackVisibility'" - date: 2022-09-15 - element: - uris: [ 'material.dart' ] - field: 'showTrackOnHover' - inClass: 'Scrollbar' - changes: - - kind: 'rename' - newName: 'trackVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/111706 - - title: "Migrate to 'trackVisibility'" - date: 2022-09-15 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'Scrollbar' - changes: - - kind: 'renameParameter' - oldName: 'showTrackOnHover' - newName: 'trackVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/111706 - - title: "Migrate to 'trackVisibility'" - date: 2022-09-15 - element: - uris: [ 'material.dart' ] - field: 'showTrackOnHover' - inClass: 'ScrollbarThemeData' - changes: - - kind: 'rename' - newName: 'trackVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/111706 - - title: "Migrate to 'thumbVisibility'" - date: 2022-09-15 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ScrollbarThemeData' - changes: - - kind: 'renameParameter' - oldName: 'showTrackOnHover' - newName: 'trackVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/111706 - - title: "Migrate to 'trackVisibility'" - date: 2022-09-15 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ScrollbarThemeData' - changes: - - kind: 'renameParameter' - oldName: 'showTrackOnHover' - newName: 'trackVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/111080 - - title: "Migrate to 'BottomAppBarTheme.color'" - date: 2022-09-07 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - oneOf: - - if: "bottomAppBarColor != ''" - changes: - - kind: 'removeParameter' - name: 'bottomAppBarColor' - - kind: 'addParameter' - index: 73 - name: 'bottomAppBarTheme' - style: optional_named - argumentValue: - expression: 'BottomAppBarTheme(color: {% bottomAppBarColor %})' - requiredIf: "bottomAppBarColor != ''" - variables: - bottomAppBarColor: - kind: 'fragment' - value: 'arguments[bottomAppBarColor]' - - # Changes made in https://github.com/flutter/flutter/pull/111080 - - title: "Migrate to 'BottomAppBarTheme.color'" - date: 2022-09-07 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - oneOf: - - if: "bottomAppBarColor != ''" - changes: - - kind: 'removeParameter' - name: 'bottomAppBarColor' - - kind: 'addParameter' - index: 73 - name: 'bottomAppBarTheme' - style: optional_named - argumentValue: - expression: 'BottomAppBarTheme(color: {% bottomAppBarColor %})' - requiredIf: "bottomAppBarColor != ''" - variables: - bottomAppBarColor: - kind: 'fragment' - value: 'arguments[bottomAppBarColor]' - - # Changes made in https://github.com/flutter/flutter/pull/111080 - - title: "Migrate to 'BottomAppBarTheme.color'" - date: 2022-09-06 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - oneOf: - - if: "bottomAppBarColor != ''" - changes: - - kind: 'removeParameter' - name: 'bottomAppBarColor' - - kind: 'addParameter' - index: 73 - name: 'bottomAppBarTheme' - style: optional_named - argumentValue: - expression: 'BottomAppBarTheme(color: {% bottomAppBarColor %})' - requiredIf: "bottomAppBarColor != ''" - variables: - bottomAppBarColor: - kind: 'fragment' - value: 'arguments[bottomAppBarColor]' - - - - # Changes made in https://github.com/flutter/flutter/pull/110162 - - title: "Migrate to 'ColorScheme.background'" - date: 2022-08-24 - element: - uris: [ 'material.dart' ] - field: 'backgroundColor' - inClass: 'ThemeData' - changes: - - kind: 'rename' - newName: 'colorScheme.background' - - # Changes made in https://github.com/flutter/flutter/pull/110162 - - title: "Migrate to 'ColorScheme.background'" - date: 2022-08-24 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - oneOf: - - if: "backgroundColor != '' && primarySwatch == '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme(background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme ==''" - - kind: 'removeParameter' - name: 'backgroundColor' - - if: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - kind: 'removeParameter' - name: 'primarySwatch' - - if: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - if: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - kind: 'removeParameter' - name: 'primarySwatch' - variables: - backgroundColor: - kind: 'fragment' - value: 'arguments[backgroundColor]' - primarySwatch: - kind: 'fragment' - value: 'arguments[primarySwatch]' - colorScheme: - kind: 'fragment' - value: 'arguments[colorScheme]' - - # Changes made in https://github.com/flutter/flutter/pull/110162 - - title: "Migrate to 'ColorScheme.background'" - date: 2022-08-24 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - oneOf: - - if: "backgroundColor != '' && primarySwatch == '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme(background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme ==''" - - kind: 'removeParameter' - name: 'backgroundColor' - - if: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - kind: 'removeParameter' - name: 'primarySwatch' - - if: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - if: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - kind: 'removeParameter' - name: 'primarySwatch' - variables: - backgroundColor: - kind: 'fragment' - value: 'arguments[backgroundColor]' - primarySwatch: - kind: 'fragment' - value: 'arguments[primarySwatch]' - colorScheme: - kind: 'fragment' - value: 'arguments[colorScheme]' - - # Changes made in https://github.com/flutter/flutter/pull/110162 - - title: "Migrate to 'ColorScheme.background'" - date: 2022-08-24 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - oneOf: - - if: "backgroundColor != '' && primarySwatch == '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme(background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - if: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - kind: 'removeParameter' - name: 'primarySwatch' - - if: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - if: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, background: {% backgroundColor %})' - requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'backgroundColor' - - kind: 'removeParameter' - name: 'primarySwatch' - variables: - backgroundColor: - kind: 'fragment' - value: 'arguments[backgroundColor]' - primarySwatch: - kind: 'fragment' - value: 'arguments[primarySwatch]' - colorScheme: - kind: 'fragment' - value: 'arguments[colorScheme]' - - # Changes made in https://github.com/flutter/flutter/pull/110162 - - title: "Migrate to 'ColorScheme.error'" - date: 2022-08-24 - element: - uris: [ 'material.dart' ] - field: 'errorColor' - inClass: 'ThemeData' - changes: - - kind: 'rename' - newName: 'colorScheme.error' - - # Changes made in https://github.com/flutter/flutter/pull/110162 - - title: "Migrate to 'ColorScheme.error'" - date: 2022-08-24 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - oneOf: - - if: "errorColor != '' && primarySwatch == '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme(error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme ==''" - - kind: 'removeParameter' - name: 'errorColor' - - if: "errorColor != '' && primarySwatch != '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'errorColor' - - kind: 'removeParameter' - name: 'primarySwatch' - - if: "errorColor != '' && primarySwatch == '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'errorColor' - - if: "errorColor != '' && primarySwatch != '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'errorColor' - - kind: 'removeParameter' - name: 'primarySwatch' - variables: - errorColor: - kind: 'fragment' - value: 'arguments[errorColor]' - primarySwatch: - kind: 'fragment' - value: 'arguments[primarySwatch]' - colorScheme: - kind: 'fragment' - value: 'arguments[colorScheme]' - - # Changes made in https://github.com/flutter/flutter/pull/110162 - - title: "Migrate to 'ColorScheme.error'" - date: 2022-08-24 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - oneOf: - - if: "errorColor != '' && primarySwatch == '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme(error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme ==''" - - kind: 'removeParameter' - name: 'errorColor' - - if: "errorColor != '' && primarySwatch != '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'errorColor' - - kind: 'removeParameter' - name: 'primarySwatch' - - if: "errorColor != '' && primarySwatch == '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'errorColor' - - if: "errorColor != '' && primarySwatch != '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'errorColor' - - kind: 'removeParameter' - name: 'primarySwatch' - variables: - errorColor: - kind: 'fragment' - value: 'arguments[errorColor]' - primarySwatch: - kind: 'fragment' - value: 'arguments[primarySwatch]' - colorScheme: - kind: 'fragment' - value: 'arguments[colorScheme]' - - # Changes made in https://github.com/flutter/flutter/pull/110162 - - title: "Migrate to 'ColorScheme.error'" - date: 2022-08-24 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - oneOf: - - if: "errorColor != '' && primarySwatch == '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme(error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme ==''" - - kind: 'removeParameter' - name: 'errorColor' - - if: "errorColor != '' && primarySwatch != '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'errorColor' - - kind: 'removeParameter' - name: 'primarySwatch' - - if: "errorColor != '' && primarySwatch == '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'errorColor' - - if: "errorColor != '' && primarySwatch != '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, error: {% errorColor %})' - requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'errorColor' - - kind: 'removeParameter' - name: 'primarySwatch' - variables: - errorColor: - kind: 'fragment' - value: 'arguments[errorColor]' - primarySwatch: - kind: 'fragment' - value: 'arguments[primarySwatch]' - colorScheme: - kind: 'fragment' - value: 'arguments[colorScheme]' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'displayLarge'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: headline1 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'displayLarge' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'displayMedium'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: headline2 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'displayMedium' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'displaySmall'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: headline3 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'displaySmall' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'headlineMedium'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: headline4 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'headlineMedium' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'headlineSmall'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: headline5 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'headlineSmall' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'titleLarge'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: headline6 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'titleLarge' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'titleMedium'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: subtitle1 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'titleMedium' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'titleSmall'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: subtitle2 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'titleSmall' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'bodyLarge'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: bodyText1 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'bodyLarge' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'bodyMedium'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: bodyText2 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'bodyMedium' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'bodySmall'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: caption - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'bodySmall' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'labelLarge'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: button - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'labelLarge' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: "Rename to 'labelSmall'" - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - getter: overline - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'labelSmall' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: 'Rename arguments' - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'TextTheme' - changes: - - kind: 'renameParameter' - oldName: 'headline1' - newName: 'displayLarge' - - kind: 'renameParameter' - oldName: 'headline2' - newName: 'displayMedium' - - kind: 'renameParameter' - oldName: 'headline3' - newName: 'displaySmall' - - kind: 'renameParameter' - oldName: 'headline4' - newName: 'headlineMedium' - - kind: 'renameParameter' - oldName: 'headline5' - newName: 'headlineSmall' - - kind: 'renameParameter' - oldName: 'headline6' - newName: 'titleLarge' - - kind: 'renameParameter' - oldName: 'subtitle1' - newName: 'titleMedium' - - kind: 'renameParameter' - oldName: 'subtitle2' - newName: 'titleSmall' - - kind: 'renameParameter' - oldName: 'bodyText1' - newName: 'bodyLarge' - - kind: 'renameParameter' - oldName: 'bodyText2' - newName: 'bodyMedium' - - kind: 'renameParameter' - oldName: 'caption' - newName: 'bodySmall' - - kind: 'renameParameter' - oldName: 'button' - newName: 'labelLarge' - - kind: 'renameParameter' - oldName: 'overline' - newName: 'labelSmall' - - # Changes made in https://github.com/flutter/flutter/pull/109817 - - title: 'Rename arguments' - date: 2022-08-18 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'TextTheme' - changes: - - kind: 'renameParameter' - oldName: 'headline1' - newName: 'displayLarge' - - kind: 'renameParameter' - oldName: 'headline2' - newName: 'displayMedium' - - kind: 'renameParameter' - oldName: 'headline3' - newName: 'displaySmall' - - kind: 'renameParameter' - oldName: 'headline4' - newName: 'headlineMedium' - - kind: 'renameParameter' - oldName: 'headline5' - newName: 'headlineSmall' - - kind: 'renameParameter' - oldName: 'headline6' - newName: 'titleLarge' - - kind: 'renameParameter' - oldName: 'subtitle1' - newName: 'titleMedium' - - kind: 'renameParameter' - oldName: 'subtitle2' - newName: 'titleSmall' - - kind: 'renameParameter' - oldName: 'bodyText1' - newName: 'bodyLarge' - - kind: 'renameParameter' - oldName: 'bodyText2' - newName: 'bodyMedium' - - kind: 'renameParameter' - oldName: 'caption' - newName: 'bodySmall' - - kind: 'renameParameter' - oldName: 'button' - newName: 'labelLarge' - - kind: 'renameParameter' - oldName: 'overline' - newName: 'labelSmall' - - # Changes made in https://github.com/flutter/flutter/pull/109070 - - title: "Remove 'selectedRowColor'" - date: 2022-08-05 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'selectedRowColor' - - # Changes made in https://github.com/flutter/flutter/pull/109070 - - title: "Remove 'selectedRowColor'" - date: 2022-08-05 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'selectedRowColor' - - # Changes made in https://github.com/flutter/flutter/pull/109070 - - title: "Remove 'selectedRowColor'" - date: 2022-08-05 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'selectedRowColor' - - # Changes made in https://github.com/flutter/flutter/pull/97972/ - - title: "Migrate 'ThemeData.toggleableActiveColor' to individual themes" - date: 2022-05-18 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'toggleableActiveColor' - - kind: 'addParameter' - index: 96 - name: 'checkboxTheme' - style: optional_named - argumentValue: - expression: "CheckboxThemeData(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && checkboxTheme == ''" - - kind: 'addParameter' - index: 97 - name: 'checkboxTheme' - style: optional_named - argumentValue: - expression: "{% checkboxTheme %}.copyWith(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && checkboxTheme != ''" - - kind: 'addParameter' - index: 98 - name: 'radioTheme' - style: optional_named - argumentValue: - expression: "RadioThemeData(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && radioTheme == ''" - - kind: 'addParameter' - index: 99 - name: 'radioTheme' - style: optional_named - argumentValue: - expression: "{% radioTheme %}.copyWith(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && radioTheme != ''" - - kind: 'addParameter' - index: 100 - name: 'switchTheme' - style: optional_named - argumentValue: - expression: "SwitchThemeData(\n - thumbColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - trackColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && switchTheme == ''" - - kind: 'addParameter' - index: 101 - name: 'switchTheme' - style: optional_named - argumentValue: - expression: "{% switchTheme %}.copyWith(\n - thumbColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - trackColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && switchTheme != ''" - variables: - checkboxTheme: - kind: 'fragment' - value: 'arguments[checkboxTheme]' - radioTheme: - kind: 'fragment' - value: 'arguments[radioTheme]' - switchTheme: - kind: 'fragment' - value: 'arguments[switchTheme]' - toggleableActiveColor: - kind: 'fragment' - value: 'arguments[toggleableActiveColor]' - - # Changes made in https://github.com/flutter/flutter/pull/97972/ - - title: "Migrate 'ThemeData.raw.toggleableActiveColor' to individual themes" - date: 2022-05-18 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'toggleableActiveColor' - - kind: 'addParameter' - index: 96 - name: 'checkboxTheme' - style: optional_named - argumentValue: - expression: "CheckboxThemeData(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && checkboxTheme == ''" - - kind: 'addParameter' - index: 97 - name: 'checkboxTheme' - style: optional_named - argumentValue: - expression: "{% checkboxTheme %}.copyWith(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && checkboxTheme != ''" - - kind: 'addParameter' - index: 98 - name: 'radioTheme' - style: optional_named - argumentValue: - expression: "RadioThemeData(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && radioTheme == ''" - - kind: 'addParameter' - index: 99 - name: 'radioTheme' - style: optional_named - argumentValue: - expression: "{% radioTheme %}.copyWith(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && radioTheme != ''" - - kind: 'addParameter' - index: 100 - name: 'switchTheme' - style: optional_named - argumentValue: - expression: "SwitchThemeData(\n - thumbColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - trackColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && switchTheme == ''" - - kind: 'addParameter' - index: 101 - name: 'switchTheme' - style: optional_named - argumentValue: - expression: "{% switchTheme %}.copyWith(\n - thumbColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - trackColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && switchTheme != ''" - variables: - checkboxTheme: - kind: 'fragment' - value: 'arguments[checkboxTheme]' - radioTheme: - kind: 'fragment' - value: 'arguments[radioTheme]' - switchTheme: - kind: 'fragment' - value: 'arguments[switchTheme]' - toggleableActiveColor: - kind: 'fragment' - value: 'arguments[toggleableActiveColor]' - - # Changes made in https://github.com/flutter/flutter/pull/97972/ - - title: "Migrate 'ThemeData.copyWith.toggleableActiveColor' to individual themes" - date: 2022-05-18 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'toggleableActiveColor' - - kind: 'addParameter' - index: 96 - name: 'checkboxTheme' - style: optional_named - argumentValue: - expression: "CheckboxThemeData(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && checkboxTheme == ''" - - kind: 'addParameter' - index: 97 - name: 'checkboxTheme' - style: optional_named - argumentValue: - expression: "{% checkboxTheme %}.copyWith(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && checkboxTheme != ''" - - kind: 'addParameter' - index: 98 - name: 'radioTheme' - style: optional_named - argumentValue: - expression: "RadioThemeData(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && radioTheme == ''" - - kind: 'addParameter' - index: 99 - name: 'radioTheme' - style: optional_named - argumentValue: - expression: "{% radioTheme %}.copyWith(\n - fillColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && radioTheme != ''" - - kind: 'addParameter' - index: 100 - name: 'switchTheme' - style: optional_named - argumentValue: - expression: "SwitchThemeData(\n - thumbColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - trackColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && switchTheme == ''" - - kind: 'addParameter' - index: 101 - name: 'switchTheme' - style: optional_named - argumentValue: - expression: "{% switchTheme %}.copyWith(\n - thumbColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - trackColor: MaterialStateProperty.resolveWith((Set states) {\n - if (states.contains(MaterialState.disabled)) { - return null; - }\n - if (states.contains(MaterialState.selected)) { - return {% toggleableActiveColor %}; - }\n - return null;\n - }),\n - )" - requiredIf: "toggleableActiveColor != '' && switchTheme != ''" - variables: - checkboxTheme: - kind: 'fragment' - value: 'arguments[checkboxTheme]' - radioTheme: - kind: 'fragment' - value: 'arguments[radioTheme]' - switchTheme: - kind: 'fragment' - value: 'arguments[switchTheme]' - toggleableActiveColor: - kind: 'fragment' - value: 'arguments[toggleableActiveColor]' - - # Changes made in https://github.com/flutter/flutter/pull/105291 - - title: "Migrate 'ElevatedButton.styleFrom(primary)' to 'ElevatedButton.styleFrom(backgroundColor)'" - date: 2022-05-27 - element: - uris: [ 'material.dart' ] - method: 'styleFrom' - inClass: 'ElevatedButton' - changes: - - kind: 'addParameter' - index: 1 - name: 'backgroundColor' - style: optional_named - argumentValue: - expression: '{% primary %}' - requiredIf: "primary != ''" - - kind: 'removeParameter' - name: 'primary' - variables: - primary: - kind: 'fragment' - value: 'arguments[primary]' - - # Changes made in https://github.com/flutter/flutter/pull/105291 - - title: "Migrate 'ElevatedButton.styleFrom(onPrimary)' to 'ElevatedButton.styleFrom(foregroundColor)'" - date: 2022-05-27 - element: - uris: [ 'material.dart' ] - method: 'styleFrom' - inClass: 'ElevatedButton' - changes: - - kind: 'addParameter' - index: 0 - name: 'foregroundColor' - style: optional_named - argumentValue: - expression: '{% onPrimary %}' - requiredIf: "onPrimary != ''" - - kind: 'removeParameter' - name: 'onPrimary' - variables: - onPrimary: - kind: 'fragment' - value: 'arguments[onPrimary]' - - # Changes made in https://github.com/flutter/flutter/pull/105291 - - title: "Migrate 'ElevatedButton.styleFrom(onSurface)' to 'ElevatedButton.styleFrom(disabledForegroundColor)'" - date: 2022-05-27 - element: - uris: [ 'material.dart' ] - method: 'styleFrom' - inClass: 'ElevatedButton' - changes: - - kind: 'addParameter' - index: 2 - name: 'disabledForegroundColor' - style: optional_named - argumentValue: - expression: '{% onSurface %}.withOpacity(0.38)' - requiredIf: "onSurface != ''" - - kind: 'addParameter' - index: 3 - name: 'disabledBackgroundColor' - style: optional_named - argumentValue: - expression: '{% onSurface %}.withOpacity(0.12)' - requiredIf: "onSurface != ''" - - kind: 'removeParameter' - name: 'onSurface' - variables: - onSurface: - kind: 'fragment' - value: 'arguments[onSurface]' - - # Changes made in https://github.com/flutter/flutter/pull/105291 - - title: "Migrate 'OutlinedButton.styleFrom(primary)' to 'OutlinedButton.styleFrom(foregroundColor)'" - date: 2022-05-27 - element: - uris: [ 'material.dart' ] - method: 'styleFrom' - inClass: 'OutlinedButton' - changes: - - kind: 'addParameter' - index: 0 - name: 'foregroundColor' - style: optional_named - argumentValue: - expression: '{% primary %}' - requiredIf: "primary != ''" - - kind: 'removeParameter' - name: 'primary' - variables: - primary: - kind: 'fragment' - value: 'arguments[primary]' - - # Changes made in https://github.com/flutter/flutter/pull/105291 - - title: "Migrate 'OutlinedButton.styleFrom(onSurface)' to 'OutlinedButton.styleFrom(disabledForeground)'" - date: 2022-05-27 - element: - uris: [ 'material.dart' ] - method: 'styleFrom' - inClass: 'OutlinedButton' - changes: - - kind: 'addParameter' - index: 2 - name: 'disabledForegroundColor' - style: optional_named - argumentValue: - expression: '{% onSurface %}.withOpacity(0.38)' - requiredIf: "onSurface != ''" - - kind: 'removeParameter' - name: 'onSurface' - variables: - onSurface: - kind: 'fragment' - value: 'arguments[onSurface]' - - # Changes made in https://github.com/flutter/flutter/pull/105291 - - title: "Migrate 'TextButton.styleFrom(primary)' to 'TextButton.styleFrom(foregroundColor)'" - date: 2022-05-27 - element: - uris: [ 'material.dart' ] - method: 'styleFrom' - inClass: 'TextButton' - changes: - - kind: 'addParameter' - index: 0 - name: 'foregroundColor' - style: optional_named - argumentValue: - expression: '{% primary %}' - requiredIf: "primary != ''" - - kind: 'removeParameter' - name: 'primary' - variables: - primary: - kind: 'fragment' - value: 'arguments[primary]' - - # Changes made in https://github.com/flutter/flutter/pull/105291 - - title: "Migrate 'TextButton.styleFrom(onSurface)' to 'TextButton.styleFrom(disabledForeground)'" - date: 2022-05-27 - element: - uris: [ 'material.dart' ] - method: 'styleFrom' - inClass: 'TextButton' - changes: - - kind: 'addParameter' - index: 2 - name: 'disabledForegroundColor' - style: optional_named - argumentValue: - expression: '{% onSurface %}.withOpacity(0.38)' - requiredIf: "onSurface != ''" - - kind: 'removeParameter' - name: 'onSurface' - variables: - onSurface: - kind: 'fragment' - value: 'arguments[onSurface]' - - # Changes made in https://github.com/flutter/flutter/pull/100381 - - title: "Migrate 'TextSelectionOverlay.fadeDuration' to SelectionOverlay.fadeDuration" - date: 2022-03-18 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - field: 'fadeDuration' - inClass: 'TextSelectionOverlay' - changes: - - kind: 'replacedBy' - newElement: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - field: 'fadeDuration' - inClass: 'SelectionOverlay' - - # Changes made in https://github.com/flutter/flutter/pull/96174 - - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" - date: 2022-01-05 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'Chip' - changes: - - kind: 'addParameter' - index: 9 - name: 'deleteButtonTooltipMessage' - style: optional_named - argumentValue: - expression: "''" - requiredIf: "useDeleteButtonTooltip == 'false' && deleteButtonTooltipMessage == ''" - - kind: 'removeParameter' - name: 'useDeleteButtonTooltip' - variables: - useDeleteButtonTooltip: - kind: 'fragment' - value: 'arguments[useDeleteButtonTooltip]' - deleteButtonTooltipMessage: - kind: 'fragment' - value: 'arguments[deleteButtonTooltipMessage]' - - # Changes made in https://github.com/flutter/flutter/pull/96174 - - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" - date: 2022-01-05 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'InputChip' - changes: - - kind: 'addParameter' - index: 9 - name: 'deleteButtonTooltipMessage' - style: optional_named - argumentValue: - expression: "''" - requiredIf: "useDeleteButtonTooltip == 'false' && deleteButtonTooltipMessage == ''" - - kind: 'removeParameter' - name: 'useDeleteButtonTooltip' - variables: - useDeleteButtonTooltip: - kind: 'fragment' - value: 'arguments[useDeleteButtonTooltip]' - deleteButtonTooltipMessage: - kind: 'fragment' - value: 'arguments[deleteButtonTooltipMessage]' - - # Changes made in https://github.com/flutter/flutter/pull/96174 - - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" - date: 2022-01-05 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'RawChip' - changes: - - kind: 'addParameter' - index: 9 - name: 'deleteButtonTooltipMessage' - style: optional_named - argumentValue: - expression: "''" - requiredIf: "useDeleteButtonTooltip == 'false' && deleteButtonTooltipMessage == ''" - - kind: 'removeParameter' - name: 'useDeleteButtonTooltip' - variables: - useDeleteButtonTooltip: - kind: 'fragment' - value: 'arguments[useDeleteButtonTooltip]' - deleteButtonTooltipMessage: - kind: 'fragment' - value: 'arguments[deleteButtonTooltipMessage]' - - # Changes made in https://github.com/flutter/flutter/pull/96174 - - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" - date: 2022-01-05 - element: - uris: [ 'material.dart' ] - field: 'useDeleteButtonTooltip' - inClass: 'Chip' - changes: - - kind: 'rename' - newName: 'deleteButtonTooltipMessage' - - # Changes made in https://github.com/flutter/flutter/pull/96174 - - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" - date: 2022-01-05 - element: - uris: [ 'material.dart' ] - field: 'useDeleteButtonTooltip' - inClass: 'InputChip' - changes: - - kind: 'rename' - newName: 'deleteButtonTooltipMessage' - - # Changes made in https://github.com/flutter/flutter/pull/96174 - - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" - date: 2022-01-05 - element: - uris: [ 'material.dart' ] - field: 'useDeleteButtonTooltip' - inClass: 'RawChip' - changes: - - kind: 'rename' - newName: 'deleteButtonTooltipMessage' - - # Changes made in https://github.com/flutter/flutter/pull/96957 - - title: "Migrate to 'thumbVisibility'" - date: 2022-01-20 - element: - uris: [ 'cupertino.dart' ] - field: 'isAlwaysShown' - inClass: 'CupertinoScrollbar' - changes: - - kind: 'rename' - newName: 'thumbVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/96957 - - title: "Migrate to 'thumbVisibility'" - date: 2022-01-20 - element: - uris: [ 'cupertino.dart' ] - constructor: '' - inClass: 'CupertinoScrollbar' - changes: - - kind: 'renameParameter' - oldName: 'isAlwaysShown' - newName: 'thumbVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/96957 - - title: "Migrate to 'thumbVisibility'" - date: 2022-01-20 - element: - uris: [ 'material.dart' ] - field: 'isAlwaysShown' - inClass: 'Scrollbar' - changes: - - kind: 'rename' - newName: 'thumbVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/96957 - - title: "Migrate to 'thumbVisibility'" - date: 2022-01-20 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'Scrollbar' - changes: - - kind: 'renameParameter' - oldName: 'isAlwaysShown' - newName: 'thumbVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/96957 - - title: "Migrate to 'thumbVisibility'" - date: 2022-01-20 - element: - uris: [ 'material.dart' ] - field: 'isAlwaysShown' - inClass: 'ScrollbarThemeData' - changes: - - kind: 'rename' - newName: 'thumbVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/96957 - - title: "Migrate to 'thumbVisibility'" - date: 2022-01-20 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ScrollbarThemeData' - changes: - - kind: 'renameParameter' - oldName: 'isAlwaysShown' - newName: 'thumbVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/96957 - - title: "Migrate to 'thumbVisibility'" - date: 2022-01-20 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ScrollbarThemeData' - changes: - - kind: 'renameParameter' - oldName: 'isAlwaysShown' - newName: 'thumbVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/96957 - - title: "Migrate to 'thumbVisibility'" - date: 2022-01-20 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - field: 'isAlwaysShown' - inClass: 'RawScrollbar' - changes: - - kind: 'rename' - newName: 'thumbVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/96957 - - title: "Migrate to 'thumbVisibility'" - date: 2022-01-20 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - constructor: '' - inClass: 'RawScrollbar' - changes: - - kind: 'renameParameter' - oldName: 'isAlwaysShown' - newName: 'thumbVisibility' - - # Changes made in https://github.com/flutter/flutter/pull/96115 - - title: "Migrate 'Icons.pie_chart_outlined' to 'Icons.pie_chart_outline'" - date: 2022-01-04 - element: - uris: [ 'material.dart' ] - field: 'pie_chart_outlined' - inClass: 'Icons' - changes: - - kind: 'rename' - newName: 'pie_chart_outline' - - # Changes made in https://github.com/flutter/flutter/pull/93427 - - title: "Remove 'primaryVariant' and 'secondaryVariant'" - date: 2021-11-19 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ColorScheme' - changes: - - kind: 'removeParameter' - name: 'primaryVariant' - - kind: 'removeParameter' - name: 'secondaryVariant' - - # Changes made in https://github.com/flutter/flutter/pull/93427 - - title: "Remove 'primaryVariant' and 'secondaryVariant'" - date: 2021-11-19 - element: - uris: [ 'material.dart' ] - constructor: 'light' - inClass: 'ColorScheme' - changes: - - kind: 'removeParameter' - name: 'primaryVariant' - - kind: 'removeParameter' - name: 'secondaryVariant' - - # Changes made in https://github.com/flutter/flutter/pull/93427 - - title: "Remove 'primaryVariant' and 'secondaryVariant'" - date: 2021-11-19 - element: - uris: [ 'material.dart' ] - constructor: 'dark' - inClass: 'ColorScheme' - changes: - - kind: 'removeParameter' - name: 'primaryVariant' - - kind: 'removeParameter' - name: 'secondaryVariant' - - # Changes made in https://github.com/flutter/flutter/pull/93427 - - title: "Remove 'primaryVariant' and 'secondaryVariant'" - date: 2021-11-19 - element: - uris: [ 'material.dart' ] - constructor: 'highContrastLight' - inClass: 'ColorScheme' - changes: - - kind: 'removeParameter' - name: 'primaryVariant' - - kind: 'removeParameter' - name: 'secondaryVariant' - - # Changes made in https://github.com/flutter/flutter/pull/93427 - - title: "Remove 'primaryVariant' and 'secondaryVariant'" - date: 2021-11-19 - element: - uris: [ 'material.dart' ] - constructor: 'highContrastDark' - inClass: 'ColorScheme' - changes: - - kind: 'removeParameter' - name: 'primaryVariant' - - kind: 'removeParameter' - name: 'secondaryVariant' - - # Changes made in https://github.com/flutter/flutter/pull/93427 - - title: "Remove 'primaryVariant' and 'secondaryVariant'" - date: 2021-11-19 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ColorScheme' - changes: - - kind: 'removeParameter' - name: 'primaryVariant' - - kind: 'removeParameter' - name: 'secondaryVariant' - - # Changes made in https://github.com/flutter/flutter/pull/93427 - - title: "Migrate 'primaryVariant' to 'primaryContainer'" - date: 2021-11-19 - element: - uris: [ 'material.dart' ] - getter: 'primaryVariant' - inClass: 'ColorScheme' - changes: - - kind: 'rename' - newName: 'primaryContainer' - - # Changes made in https://github.com/flutter/flutter/pull/93427 - - title: "Migrate 'secondaryVariant' to 'secondaryContainer'" - date: 2021-11-19 - element: - uris: [ 'material.dart' ] - getter: 'secondaryVariant' - inClass: 'ColorScheme' - changes: - - kind: 'rename' - newName: 'secondaryContainer' - - # Changes made in https://github.com/flutter/flutter/pull/93396 - - title: "Remove 'primaryColorBrightness'" - date: 2021-11-11 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'primaryColorBrightness' - - # Changes made in https://github.com/flutter/flutter/pull/93396 - - title: "Remove 'primaryColorBrightness'" - date: 2021-11-11 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'primaryColorBrightness' - - # Changes made in https://github.com/flutter/flutter/pull/93396 - - title: "Remove 'primaryColorBrightness'" - date: 2021-11-11 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'primaryColorBrightness' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'backgroundColor'" - date: 2021-07-12 - element: - uris: [ 'material.dart' ] - getter: color - inClass: 'AppBarTheme' - changes: - - kind: 'rename' - newName: 'backgroundColor' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Remove 'backwardsCompatibility'" - date: 2021-07-12 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'AppBarTheme' - changes: - - kind: 'removeParameter' - name: 'backwardsCompatibility' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Remove 'backwardsCompatibility'" - date: 2020-07-12 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'AppBarTheme' - changes: - - kind: 'removeParameter' - name: 'backwardsCompatibility' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Remove 'backwardsCompatibility'" - date: 2020-07-12 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'SliverAppBar' - changes: - - kind: 'removeParameter' - name: 'backwardsCompatibility' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Remove 'backwardsCompatibility'" - date: 2020-07-12 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'AppBar' - changes: - - kind: 'removeParameter' - name: 'backwardsCompatibility' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'toolbarTextStyle' & 'titleTextStyle'" - date: 2021-07-12 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'AppBarTheme' - changes: - - kind: 'addParameter' - index: 12 - name: 'toolbarTextStyle' - style: optional_named - argumentValue: - expression: '{% textTheme %}.bodyText2' - requiredIf: "textTheme != ''" - - kind: 'addParameter' - index: 13 - name: 'titleTextStyle' - style: optional_named - argumentValue: - expression: '{% textTheme %}.headline6' - requiredIf: "textTheme != ''" - - kind: 'removeParameter' - name: 'textTheme' - variables: - textTheme: - kind: 'fragment' - value: 'arguments[textTheme]' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'toolbarTextStyle' & 'titleTextStyle'" - date: 2020-07-12 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'AppBarTheme' - changes: - - kind: 'addParameter' - index: 13 - name: 'toolbarTextStyle' - style: optional_named - argumentValue: - expression: '{% textTheme %}.bodyText2' - requiredIf: "textTheme != ''" - - kind: 'addParameter' - index: 14 - name: 'titleTextStyle' - style: optional_named - argumentValue: - expression: '{% textTheme %}.headline6' - requiredIf: "textTheme != ''" - - kind: 'removeParameter' - name: 'textTheme' - variables: - textTheme: - kind: 'fragment' - value: 'arguments[textTheme]' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'toolbarTextStyle'" - date: 2021-07-12 - # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 - bulkApply: false - element: - uris: [ 'material.dart' ] - field: 'textTheme' - inClass: 'AppBarTheme' - changes: - - kind: 'rename' - newName: 'toolbarTextStyle' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'titleTextStyle'" - date: 2021-07-12 - # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 - bulkApply: false - element: - uris: [ 'material.dart' ] - field: 'textTheme' - inClass: 'AppBarTheme' - changes: - - kind: 'rename' - newName: 'titleTextStyle' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'toolbarTextStyle' & 'titleTextStyle'" - date: 2020-07-12 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'SliverAppBar' - changes: - - kind: 'addParameter' - index: 32 - name: 'toolbarTextStyle' - style: optional_named - argumentValue: - expression: '{% textTheme %}.bodyText2' - requiredIf: "textTheme != ''" - - kind: 'addParameter' - index: 33 - name: 'titleTextStyle' - style: optional_named - argumentValue: - expression: '{% textTheme %}.headline6' - requiredIf: "textTheme != ''" - - kind: 'removeParameter' - name: 'textTheme' - variables: - textTheme: - kind: 'fragment' - value: 'arguments[textTheme]' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'toolbarTextStyle'" - date: 2021-07-12 - # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 - bulkApply: false - element: - uris: [ 'material.dart' ] - field: 'textTheme' - inClass: 'SliverAppBar' - changes: - - kind: 'rename' - newName: 'toolbarTextStyle' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'titleTextStyle'" - date: 2021-07-12 - # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 - bulkApply: false - element: - uris: [ 'material.dart' ] - field: 'textTheme' - inClass: 'SliverAppBar' - changes: - - kind: 'rename' - newName: 'titleTextStyle' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'toolbarTextStyle' & 'titleTextStyle'" - date: 2020-07-12 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'AppBar' - changes: - - kind: 'addParameter' - index: 24 - name: 'toolbarTextStyle' - style: optional_named - argumentValue: - expression: '{% textTheme %}.bodyText2' - requiredIf: "textTheme != ''" - - kind: 'addParameter' - index: 25 - name: 'titleTextStyle' - style: optional_named - argumentValue: - expression: '{% textTheme %}.headline6' - requiredIf: "textTheme != ''" - - kind: 'removeParameter' - name: 'textTheme' - variables: - textTheme: - kind: 'fragment' - value: 'arguments[textTheme]' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'toolbarTextStyle'" - date: 2021-07-12 - # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 - bulkApply: false - element: - uris: [ 'material.dart' ] - field: 'textTheme' - inClass: 'AppBar' - changes: - - kind: 'rename' - newName: 'toolbarTextStyle' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'titleTextStyle'" - date: 2021-07-12 - # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 - bulkApply: false - element: - uris: [ 'material.dart' ] - field: 'textTheme' - inClass: 'AppBar' - changes: - - kind: 'rename' - newName: 'titleTextStyle' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'systemOverlayStyle'" - date: 2021-07-12 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'AppBarTheme' - oneOf: - - if: "brightness == 'Brightness.dark'" - changes: - - kind: 'addParameter' - index: 14 - name: 'systemOverlayStyle' - style: optional_named - argumentValue: - expression: '{% SystemUiOverlayStyle %}.light' - requiredIf: "brightness == 'Brightness.dark'" - variables: - SystemUiOverlayStyle: - kind: 'import' - uris: [ 'services.dart' ] - name: 'SystemUiOverlayStyle' - - kind: 'removeParameter' - name: 'brightness' - - if: "brightness == 'Brightness.light'" - changes: - - kind: 'addParameter' - index: 14 - name: 'systemOverlayStyle' - style: optional_named - argumentValue: - expression: '{% SystemUiOverlayStyle %}.dark' - requiredIf: "brightness == 'Brightness.light'" - variables: - SystemUiOverlayStyle: - kind: 'import' - uris: [ 'services.dart' ] - name: 'SystemUiOverlayStyle' - - kind: 'removeParameter' - name: 'brightness' - variables: - brightness: - kind: 'fragment' - value: 'arguments[brightness]' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'systemOverlayStyle'" - date: 2020-07-12 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'AppBarTheme' - oneOf: - - if: "brightness == 'Brightness.dark'" - changes: - - kind: 'addParameter' - index: 14 - name: 'systemOverlayStyle' - style: optional_named - argumentValue: - expression: '{% SystemUiOverlayStyle %}.light' - requiredIf: "brightness == 'Brightness.dark'" - variables: - SystemUiOverlayStyle: - kind: 'import' - uris: [ 'services.dart' ] - name: 'SystemUiOverlayStyle' - - kind: 'removeParameter' - name: 'brightness' - - if: "brightness == 'Brightness.light'" - changes: - - kind: 'addParameter' - index: 14 - name: 'systemOverlayStyle' - style: optional_named - argumentValue: - expression: '{% SystemUiOverlayStyle %}.dark' - requiredIf: "brightness == 'Brightness.light'" - variables: - SystemUiOverlayStyle: - kind: 'import' - uris: [ 'services.dart' ] - name: 'SystemUiOverlayStyle' - - kind: 'removeParameter' - name: 'brightness' - variables: - brightness: - kind: 'fragment' - value: 'arguments[brightness]' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'systemOverlayStyle'" - date: 2021-07-12 - element: - uris: [ 'material.dart' ] - field: 'brightness' - inClass: 'AppBarTheme' - changes: - - kind: 'rename' - newName: 'systemOverlayStyle' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'systemOverlayStyle'" - date: 2020-07-12 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'SliverAppBar' - oneOf: - - if: "brightness == 'Brightness.dark'" - changes: - - kind: 'addParameter' - index: 34 - name: 'systemOverlayStyle' - style: optional_named - argumentValue: - expression: '{% SystemUiOverlayStyle %}.light' - requiredIf: "brightness == 'Brightness.dark'" - variables: - SystemUiOverlayStyle: - kind: 'import' - uris: [ 'services.dart' ] - name: 'SystemUiOverlayStyle' - - kind: 'removeParameter' - name: 'brightness' - - if: "brightness == 'Brightness.light'" - changes: - - kind: 'addParameter' - index: 34 - name: 'systemOverlayStyle' - style: optional_named - argumentValue: - expression: '{% SystemUiOverlayStyle %}.dark' - requiredIf: "brightness == 'Brightness.light'" - variables: - SystemUiOverlayStyle: - kind: 'import' - uris: [ 'services.dart' ] - name: 'SystemUiOverlayStyle' - - kind: 'removeParameter' - name: 'brightness' - variables: - brightness: - kind: 'fragment' - value: 'arguments[brightness]' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'systemOverlayStyle'" - date: 2021-07-12 - element: - uris: [ 'material.dart' ] - field: 'brightness' - inClass: 'SliverAppBar' - changes: - - kind: 'rename' - newName: 'systemOverlayStyle' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'systemOverlayStyle'" - date: 2020-07-12 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'AppBar' - oneOf: - - if: "brightness == 'Brightness.dark'" - changes: - - kind: 'addParameter' - index: 27 - name: 'systemOverlayStyle' - style: optional_named - argumentValue: - expression: '{% SystemUiOverlayStyle %}.light' - requiredIf: "brightness == 'Brightness.dark'" - variables: - SystemUiOverlayStyle: - kind: 'import' - uris: [ 'services.dart' ] - name: 'SystemUiOverlayStyle' - - kind: 'removeParameter' - name: 'brightness' - - if: "brightness == 'Brightness.light'" - changes: - - kind: 'addParameter' - index: 27 - name: 'systemOverlayStyle' - style: optional_named - argumentValue: - expression: '{% SystemUiOverlayStyle %}.dark' - requiredIf: "brightness == 'Brightness.light'" - variables: - SystemUiOverlayStyle: - kind: 'import' - uris: [ 'services.dart' ] - name: 'SystemUiOverlayStyle' - - kind: 'removeParameter' - name: 'brightness' - variables: - brightness: - kind: 'fragment' - value: 'arguments[brightness]' - - # Changes made in https://github.com/flutter/flutter/pull/86198 - - title: "Migrate to 'systemOverlayStyle'" - date: 2021-07-12 - element: - uris: [ 'material.dart' ] - field: 'brightness' - inClass: 'AppBar' - changes: - - kind: 'rename' - newName: 'systemOverlayStyle' - - # Changes made in https://github.com/flutter/flutter/pull/87839 - - title: "Migrate to 'disallowIndicator'" - date: 2021-08-06 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'disallowGlow' - inClass: 'OverscrollIndicatorNotification' - changes: - - kind: 'rename' - newName: 'disallowIndicator' - - # Changes made in https://github.com/flutter/flutter/pull/87281 - - title: "Remove 'fixTextFieldOutlineLabel'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'fixTextFieldOutlineLabel' - - # Changes made in https://github.com/flutter/flutter/pull/87281 - - title: "Remove 'fixTextFieldOutlineLabel'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'fixTextFieldOutlineLabel' - - # Changes made in https://github.com/flutter/flutter/pull/87281 - - title: "Remove 'fixTextFieldOutlineLabel'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'fixTextFieldOutlineLabel' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'buttonColor'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'buttonColor' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'buttonColor'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'buttonColor' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'buttonColor'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'buttonColor' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'accentIconTheme'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'accentIconTheme' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'accentIconTheme'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'accentIconTheme' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'accentIconTheme'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'accentIconTheme' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'accentTextTheme'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'accentTextTheme' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'accentTextTheme'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'accentTextTheme' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'accentTextTheme'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'accentTextTheme' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'accentColorBrightness'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'accentColorBrightness' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'accentColorBrightness'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'accentColorBrightness' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Remove 'accentColorBrightness'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - changes: - - kind: 'removeParameter' - name: 'accentColorBrightness' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Migrate to 'ColorScheme.secondary'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - field: 'accentColor' - inClass: 'ThemeData' - changes: - - kind: 'rename' - newName: 'colorScheme.secondary' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Migrate to 'ColorScheme.secondary'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'ThemeData' - oneOf: - - if: "accentColor != '' && primarySwatch == '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''" - - kind: 'removeParameter' - name: 'accentColor' - - if: "accentColor != '' && primarySwatch != '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'accentColor' - - kind: 'removeParameter' - name: 'primarySwatch' - - if: "accentColor != '' && primarySwatch == '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'accentColor' - - if: "accentColor != '' && primarySwatch != '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'accentColor' - - kind: 'removeParameter' - name: 'primarySwatch' - variables: - accentColor: - kind: 'fragment' - value: 'arguments[accentColor]' - primarySwatch: - kind: 'fragment' - value: 'arguments[primarySwatch]' - colorScheme: - kind: 'fragment' - value: 'arguments[colorScheme]' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Migrate to 'ColorScheme.secondary'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - oneOf: - - if: "accentColor != '' && primarySwatch == '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''" - - kind: 'removeParameter' - name: 'accentColor' - - if: "accentColor != '' && primarySwatch != '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'accentColor' - - kind: 'removeParameter' - name: 'primarySwatch' - - if: "accentColor != '' && primarySwatch == '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'accentColor' - - if: "accentColor != '' && primarySwatch != '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'accentColor' - - kind: 'removeParameter' - name: 'primarySwatch' - variables: - accentColor: - kind: 'fragment' - value: 'arguments[accentColor]' - primarySwatch: - kind: 'fragment' - value: 'arguments[primarySwatch]' - colorScheme: - kind: 'fragment' - value: 'arguments[colorScheme]' - - # Changes made in https://github.com/flutter/flutter/pull/81336 - - title: "Migrate to 'ColorScheme.secondary'" - date: 2021-04-30 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - oneOf: - - if: "accentColor != '' && primarySwatch == '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''" - - kind: 'removeParameter' - name: 'accentColor' - - if: "accentColor != '' && primarySwatch != '' && colorScheme == ''" - changes: - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''" - - kind: 'removeParameter' - name: 'accentColor' - - kind: 'removeParameter' - name: 'primarySwatch' - - if: "accentColor != '' && primarySwatch == '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'accentColor' - - if: "accentColor != '' && primarySwatch != '' && colorScheme != ''" - changes: - - kind: 'removeParameter' - name: 'colorScheme' # Remove to add back with modification - - kind: 'addParameter' - index: 56 - name: 'colorScheme' - style: optional_named - argumentValue: - expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})' - requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''" - - kind: 'removeParameter' - name: 'accentColor' - - kind: 'removeParameter' - name: 'primarySwatch' - variables: - accentColor: - kind: 'fragment' - value: 'arguments[accentColor]' - primarySwatch: - kind: 'fragment' - value: 'arguments[primarySwatch]' - colorScheme: - kind: 'fragment' - value: 'arguments[colorScheme]' - - # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - - title: "Migrate to 'clipBehavior'" - date: 2020-08-20 - element: - uris: [ 'rendering.dart' ] - field: 'clipToSize' - inClass: 'RenderListWheelViewport' - changes: - - kind: 'rename' - newName: 'clipBehavior' - - # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - - title: "Migrate to 'clipBehavior'" - date: 2020-08-20 - element: - uris: [ 'rendering.dart' ] - constructor: '' - inClass: 'RenderListWheelViewport' - oneOf: - - if: "clipToSize == 'true'" - changes: - - kind: 'addParameter' - index: 13 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.hardEdge' - requiredIf: "clipToSize == 'true'" - - kind: 'removeParameter' - name: 'clipToSize' - - if: "clipToSize == 'false'" - changes: - - kind: 'addParameter' - index: 13 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.none' - requiredIf: "clipToSize == 'false'" - - kind: 'removeParameter' - name: 'clipToSize' - variables: - clipToSize: - kind: 'fragment' - value: 'arguments[clipToSize]' - - # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - - title: "Migrate to 'clipBehavior'" - date: 2020-08-20 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - field: 'clipToSize' - inClass: 'ListWheelViewport' - changes: - - kind: 'rename' - newName: 'clipBehavior' - - # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - - title: "Migrate to 'clipBehavior'" - date: 2020-08-20 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - constructor: '' - inClass: 'ListWheelViewport' - oneOf: - - if: "clipToSize == 'true'" - changes: - - kind: 'addParameter' - index: 13 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.hardEdge' - requiredIf: "clipToSize == 'true'" - - kind: 'removeParameter' - name: 'clipToSize' - - if: "clipToSize == 'false'" - changes: - - kind: 'addParameter' - index: 13 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.none' - requiredIf: "clipToSize == 'false'" - - kind: 'removeParameter' - name: 'clipToSize' - variables: - clipToSize: - kind: 'fragment' - value: 'arguments[clipToSize]' - - # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - - title: "Migrate to 'clipBehavior'" - date: 2020-08-20 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - constructor: 'useDelegate' - inClass: 'ListWheelScrollView' - oneOf: - - if: "clipToSize == 'true'" - changes: - - kind: 'addParameter' - index: 13 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.hardEdge' - requiredIf: "clipToSize == 'true'" - - kind: 'removeParameter' - name: 'clipToSize' - - if: "clipToSize == 'false'" - changes: - - kind: 'addParameter' - index: 13 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.none' - requiredIf: "clipToSize == 'false'" - - kind: 'removeParameter' - name: 'clipToSize' - variables: - clipToSize: - kind: 'fragment' - value: 'arguments[clipToSize]' - - # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - - title: "Migrate to 'clipBehavior'" - date: 2020-08-20 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - field: 'clipToSize' - inClass: 'ListWheelScrollView' - changes: - - kind: 'rename' - newName: 'clipBehavior' - - # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - - title: "Migrate to 'clipBehavior'" - date: 2020-08-20 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - constructor: '' - inClass: 'ListWheelScrollView' - oneOf: - - if: "clipToSize == 'true'" - changes: - - kind: 'addParameter' - index: 13 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.hardEdge' - requiredIf: "clipToSize == 'true'" - - kind: 'removeParameter' - name: 'clipToSize' - - if: "clipToSize == 'false'" - changes: - - kind: 'addParameter' - index: 13 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.none' - requiredIf: "clipToSize == 'false'" - - kind: 'removeParameter' - name: 'clipToSize' - variables: - clipToSize: - kind: 'fragment' - value: 'arguments[clipToSize]' - - # Changes made in https://github.com/flutter/flutter/pull/66305 - - title: "Migrate to 'clipBehavior'" - date: 2020-09-22 - element: - uris: [ 'rendering.dart' ] - field: 'overflow' - inClass: 'RenderStack' - changes: - - kind: 'rename' - newName: 'clipBehavior' - - # Changes made in https://github.com/flutter/flutter/pull/66305 - - title: "Migrate to 'clipBehavior'" - date: 2020-09-22 - element: - uris: [ 'rendering.dart' ] - constructor: '' - inClass: 'RenderStack' - oneOf: - - if: "overflow == 'Overflow.clip'" - changes: - - kind: 'addParameter' - index: 0 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.hardEdge' - requiredIf: "overflow == 'Overflow.clip'" - - kind: 'removeParameter' - name: 'overflow' - - if: "overflow == 'Overflow.visible'" - changes: - - kind: 'addParameter' - index: 0 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.none' - requiredIf: "overflow == 'Overflow.visible'" - - kind: 'removeParameter' - name: 'overflow' - variables: - overflow: - kind: 'fragment' - value: 'arguments[overflow]' - - # Changes made in https://github.com/flutter/flutter/pull/81303 - - title: "Migrate to 'setEnabledSystemUIMode'" - date: 2021-06-08 - element: - uris: [ 'services.dart' ] - method: 'setEnabledSystemUIOverlays' - inClass: 'SystemChrome' - changes: - - kind: 'rename' - newName: 'setEnabledSystemUIMode' - - kind: 'removeParameter' - index: 0 - - kind: 'addParameter' - index: 0 - name: 'mode' - style: required_positional - argumentValue: - expression: 'SystemUiMode.manual' - - kind: 'addParameter' - index: 1 - name: 'overlays' - style: optional_named - argumentValue: - expression: '{% overlays %}' - requiredIf: "overlays != ''" - variables: - overlays: - kind: 'fragment' - value: 'arguments[0]' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'removeRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'removeChildRenderObject' - inClass: 'RenderObjectToWidgetElement' - changes: - - kind: 'rename' - newName: 'removeRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'moveRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'moveChildRenderObject' - inClass: 'RenderObjectToWidgetElement' - changes: - - kind: 'rename' - newName: 'moveRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'insertRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'insertChildRenderObject' - inClass: 'RenderObjectToWidgetElement' - changes: - - kind: 'rename' - newName: 'insertRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'removeRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'removeChildRenderObject' - inClass: 'SliverMultiBoxAdaptorElement' - changes: - - kind: 'rename' - newName: 'removeRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'moveRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'moveChildRenderObject' - inClass: 'SliverMultiBoxAdaptorElement' - changes: - - kind: 'rename' - newName: 'moveRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'insertRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'insertChildRenderObject' - inClass: 'SliverMultiBoxAdaptorElement' - changes: - - kind: 'rename' - newName: 'insertRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'removeRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'removeChildRenderObject' - inClass: 'SingleChildRenderObjectElement' - changes: - - kind: 'rename' - newName: 'removeRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'moveRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'moveChildRenderObject' - inClass: 'SingleChildRenderObjectElement' - changes: - - kind: 'rename' - newName: 'moveRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'insertRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'insertChildRenderObject' - inClass: 'SingleChildRenderObjectElement' - changes: - - kind: 'rename' - newName: 'insertRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'removeRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'removeChildRenderObject' - inClass: 'MultiChildRenderObjectElement' - changes: - - kind: 'rename' - newName: 'removeRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'moveRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'moveChildRenderObject' - inClass: 'MultiChildRenderObjectElement' - changes: - - kind: 'rename' - newName: 'moveRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'insertRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'insertChildRenderObject' - inClass: 'MultiChildRenderObjectElement' - changes: - - kind: 'rename' - newName: 'insertRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'removeRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'removeChildRenderObject' - inClass: 'ListWheelElement' - changes: - - kind: 'rename' - newName: 'removeRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'moveRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'moveChildRenderObject' - inClass: 'ListWheelElement' - changes: - - kind: 'rename' - newName: 'moveRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'insertRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'insertChildRenderObject' - inClass: 'ListWheelElement' - changes: - - kind: 'rename' - newName: 'insertRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'removeRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'removeChildRenderObject' - inClass: 'LeafRenderObjectElement' - changes: - - kind: 'rename' - newName: 'removeRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'moveRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'moveChildRenderObject' - inClass: 'LeafRenderObjectElement' - changes: - - kind: 'rename' - newName: 'moveRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/64254 - - title: "Migrate to 'insertRenderObjectChild'" - date: 2020-08-20 - element: - uris: [ 'cupertino.dart', 'widgets.dart', 'material.dart' ] - method: 'insertChildRenderObject' - inClass: 'LeafRenderObjectElement' - changes: - - kind: 'rename' - newName: 'insertRenderObjectChild' - - # Changes made in https://github.com/flutter/flutter/pull/60320 - - title: "Migrate to 'viewId'" - date: 2020-07-05 - element: - uris: [ 'services.dart' ] - getter: id - inClass: 'TextureAndroidViewController' - changes: - - kind: 'rename' - newName: 'viewId' - - # Changes made in https://github.com/flutter/flutter/pull/60320 - - title: "Migrate to 'viewId'" - date: 2020-07-05 - element: - uris: [ 'services.dart' ] - getter: id - inClass: 'SurfaceAndroidViewController' - changes: - - kind: 'rename' - newName: 'viewId' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'ScaleGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'MultiTapGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 4 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'DoubleTapGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'DelayedMultiDragGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 4 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'VerticalMultiDragGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'HorizontalMultiDragGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'ImmediateMultiDragGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'MultiDragGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'LongPressGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 4 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'ForcePressGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 6 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'EagerGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 2 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'PrimaryPointerGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 6 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'OneSequenceGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'GestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'HorizontalDragGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'VerticalDragGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 3 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/81858 - - title: "Migrate to 'supportedDevices'" - date: 2021-05-04 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'DragGestureRecognizer' - oneOf: - - if: "kind != ''" - changes: - - kind: 'addParameter' - index: 5 - name: 'supportedDevices' - style: optional_named - argumentValue: - expression: '{{% kind %}}' - requiredIf: "kind != ''" - - kind: 'removeParameter' - name: 'kind' - variables: - kind: - kind: 'fragment' - value: 'arguments[kind]' - - # Changes made in https://github.com/flutter/flutter/pull/79160 - - title: "Migrate to 'dragAnchorStrategy'" - date: 2021-04-05 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - field: 'dragAnchor' - inClass: 'Draggable' - changes: - - kind: 'rename' - newName: 'dragAnchorStrategy' - - # Changes made in https://github.com/flutter/flutter/pull/79160 - - title: "Migrate to 'dragAnchorStrategy'" - date: 2021-04-05 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - constructor: '' - inClass: 'Draggable' - oneOf: - - if: "dragAnchor == 'DragAnchor.child'" - changes: - - kind: 'addParameter' - index: 9 - name: 'dragAnchorStrategy' - style: optional_named - argumentValue: - expression: 'childDragAnchorStrategy' - requiredIf: "dragAnchor == 'DragAnchor.child'" - - kind: 'removeParameter' - name: 'dragAnchor' - - if: "dragAnchor == 'DragAnchor.pointer'" - changes: - - kind: 'addParameter' - index: 9 - name: 'dragAnchorStrategy' - style: optional_named - argumentValue: - expression: 'pointerDragAnchorStrategy' - requiredIf: "dragAnchor == 'DragAnchor.pointer'" - - kind: 'removeParameter' - name: 'dragAnchor' - variables: - dragAnchor: - kind: 'fragment' - value: 'arguments[dragAnchor]' - - # Changes made in https://github.com/flutter/flutter/pull/79160 - - title: "Migrate to 'dragAnchorStrategy'" - date: 2021-04-05 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - field: 'dragAnchor' - inClass: 'LongPressDraggable' - changes: - - kind: 'rename' - newName: 'dragAnchorStrategy' - - # Changes made in https://github.com/flutter/flutter/pull/79160 - - title: "Migrate to 'dragAnchorStrategy'" - date: 2021-04-05 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - constructor: '' - inClass: 'LongPressDraggable' - oneOf: - - if: "dragAnchor == 'DragAnchor.child'" - changes: - - kind: 'addParameter' - index: 9 - name: 'dragAnchorStrategy' - style: optional_named - argumentValue: - expression: 'childDragAnchorStrategy' - requiredIf: "dragAnchor == 'DragAnchor.child'" - - kind: 'removeParameter' - name: 'dragAnchor' - - if: "dragAnchor == 'DragAnchor.pointer'" - changes: - - kind: 'addParameter' - index: 9 - name: 'dragAnchorStrategy' - style: optional_named - argumentValue: - expression: 'pointerDragAnchorStrategy' - requiredIf: "dragAnchor == 'DragAnchor.pointer'" - - kind: 'removeParameter' - name: 'dragAnchor' - variables: - dragAnchor: - kind: 'fragment' - value: 'arguments[dragAnchor]' - - # Changes made in https://github.com/flutter/flutter/pull/66482 - - title: "Migrate to 'TextSelectionThemeData'" - date: 2020-09-24 - element: - uris: [ 'material.dart' ] - constructor: 'raw' - inClass: 'ThemeData' - oneOf: - - if: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor != ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionColor: {% textSelectionColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' - requiredIf: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor != ''" - - kind: 'removeParameter' - name: 'textSelectionColor' - - kind: 'removeParameter' - name: 'cursorColor' - - kind: 'removeParameter' - name: 'textSelectionHandleColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor != ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' - requiredIf: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor != ''" - - kind: 'removeParameter' - name: 'cursorColor' - - kind: 'removeParameter' - name: 'textSelectionHandleColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor == ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionColor: {% textSelectionColor %},)' - requiredIf: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor == ''" - - kind: 'removeParameter' - name: 'textSelectionColor' - - kind: 'removeParameter' - name: 'cursorColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor != ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(selectionColor: {% textSelectionColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' - requiredIf: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor != ''" - - kind: 'removeParameter' - name: 'textSelectionColor' - - kind: 'removeParameter' - name: 'textSelectionHandleColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor == ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %})' - requiredIf: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor == ''" - - kind: 'removeParameter' - name: 'cursorColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor == ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(selectionColor: {% textSelectionColor %})' - requiredIf: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor == ''" - - kind: 'removeParameter' - name: 'textSelectionColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor == '' && cursorColor == '' && textSelectionHandleColor != ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(selectionHandleColor: {% textSelectionHandleColor %})' - requiredIf: "textSelectionColor == '' && cursorColor == '' && textSelectionHandleColor != ''" - - kind: 'removeParameter' - name: 'textSelectionHandleColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "useTextSelectionTheme != ''" - changes: - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - variables: - textSelectionColor: - kind: 'fragment' - value: 'arguments[textSelectionColor]' - cursorColor: - kind: 'fragment' - value: 'arguments[cursorColor]' - textSelectionHandleColor: - kind: 'fragment' - value: 'arguments[textSelectionHandleColor]' - useTextSelectionTheme: - kind: 'fragment' - value: 'arguments[useTextSelectionTheme]' - - # Changes made in https://github.com/flutter/flutter/pull/66482 - - title: "Migrate to 'TextSelectionThemeData'" - date: 2020-09-24 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'ThemeData' - oneOf: - - if: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor != ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionColor: {% textSelectionColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' - requiredIf: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor != ''" - - kind: 'removeParameter' - name: 'textSelectionColor' - - kind: 'removeParameter' - name: 'cursorColor' - - kind: 'removeParameter' - name: 'textSelectionHandleColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor != ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' - requiredIf: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor != ''" - - kind: 'removeParameter' - name: 'cursorColor' - - kind: 'removeParameter' - name: 'textSelectionHandleColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor == ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionColor: {% textSelectionColor %},)' - requiredIf: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor == ''" - - kind: 'removeParameter' - name: 'textSelectionColor' - - kind: 'removeParameter' - name: 'cursorColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor != ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(selectionColor: {% textSelectionColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' - requiredIf: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor != ''" - - kind: 'removeParameter' - name: 'textSelectionColor' - - kind: 'removeParameter' - name: 'textSelectionHandleColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor == ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %})' - requiredIf: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor == ''" - - kind: 'removeParameter' - name: 'cursorColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor == ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(selectionColor: {% textSelectionColor %})' - requiredIf: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor == ''" - - kind: 'removeParameter' - name: 'textSelectionColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "textSelectionColor == '' && cursorColor == '' && textSelectionHandleColor != ''" - changes: - - kind: 'addParameter' - index: 73 - name: 'textSelectionTheme' - style: optional_named - argumentValue: - expression: 'TextSelectionThemeData(selectionHandleColor: {% textSelectionHandleColor %})' - requiredIf: "textSelectionColor == '' && cursorColor == '' && textSelectionHandleColor != ''" - - kind: 'removeParameter' - name: 'textSelectionHandleColor' - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - - if: "useTextSelectionTheme != ''" - changes: - - kind: 'removeParameter' - name: 'useTextSelectionTheme' - variables: - textSelectionColor: - kind: 'fragment' - value: 'arguments[textSelectionColor]' - cursorColor: - kind: 'fragment' - value: 'arguments[cursorColor]' - textSelectionHandleColor: - kind: 'fragment' - value: 'arguments[textSelectionHandleColor]' - useTextSelectionTheme: - kind: 'fragment' - value: 'arguments[useTextSelectionTheme]' - - # Changes made in https://github.com/flutter/flutter/pull/65246 - - title: "Remove 'disabledThumbGapWidth'" - date: 2020-11-17 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'RectangularSliderTrackShape' - changes: - - kind: 'removeParameter' - name: 'disabledThumbGapWidth' - - # Changes made in https://github.com/flutter/flutter/pull/46115 - - title: "Migrate to 'floatingLabelBehavior'" - date: 2020-01-15 - element: - uris: [ 'material.dart' ] - field: 'hasFloatingPlaceholder' - inClass: 'InputDecorationTheme' - changes: - - kind: 'rename' - newName: 'floatingLabelBehavior' - - # Changes made in https://github.com/flutter/flutter/pull/46115 - - title: "Migrate to 'floatingLabelBehavior'" - date: 2020-01-15 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'InputDecorationTheme' - oneOf: - - if: "hasFloatingPlaceholder == 'true'" - changes: - - kind: 'addParameter' - index: 14 - name: 'floatingLabelBehavior' - style: optional_named - argumentValue: - expression: '{% FloatingLabelBehavior %}.auto' - requiredIf: "hasFloatingPlaceholder == 'true'" - variables: - FloatingLabelBehavior: - kind: 'import' - uris: [ 'material.dart' ] - name: 'FloatingLabelBehavior' - - kind: 'removeParameter' - name: 'hasFloatingPlaceholder' - - if: "hasFloatingPlaceholder == 'false'" - changes: - - kind: 'addParameter' - index: 14 - name: 'floatingLabelBehavior' - style: optional_named - argumentValue: - expression: '{% FloatingLabelBehavior %}.never' - requiredIf: "hasFloatingPlaceholder == 'false'" - variables: - FloatingLabelBehavior: - kind: 'import' - uris: [ 'material.dart' ] - name: 'FloatingLabelBehavior' - - kind: 'removeParameter' - name: 'hasFloatingPlaceholder' - variables: - hasFloatingPlaceholder: - kind: 'fragment' - value: 'arguments[hasFloatingPlaceholder]' - - # Changes made in https://github.com/flutter/flutter/pull/46115 - - title: "Migrate to 'floatingLabelBehavior'" - date: 2020-01-15 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'InputDecorationTheme' - oneOf: - - if: "hasFloatingPlaceholder == 'true'" - changes: - - kind: 'addParameter' - index: 14 - name: 'floatingLabelBehavior' - style: optional_named - argumentValue: - expression: '{% FloatingLabelBehavior %}.auto' - requiredIf: "hasFloatingPlaceholder == 'true'" - variables: - FloatingLabelBehavior: - kind: 'import' - uris: [ 'material.dart' ] - name: 'FloatingLabelBehavior' - - kind: 'removeParameter' - name: 'hasFloatingPlaceholder' - - if: "hasFloatingPlaceholder == 'false'" - changes: - - kind: 'addParameter' - index: 14 - name: 'floatingLabelBehavior' - style: optional_named - argumentValue: - expression: '{% FloatingLabelBehavior %}.never' - requiredIf: "hasFloatingPlaceholder == 'false'" - variables: - FloatingLabelBehavior: - kind: 'import' - uris: [ 'material.dart' ] - name: 'FloatingLabelBehavior' - - kind: 'removeParameter' - name: 'hasFloatingPlaceholder' - variables: - hasFloatingPlaceholder: - kind: 'fragment' - value: 'arguments[hasFloatingPlaceholder]' - - # Changes made in https://github.com/flutter/flutter/pull/46115 - - title: "Migrate to 'floatingLabelBehavior'" - date: 2020-01-15 - element: - uris: [ 'material.dart' ] - field: 'hasFloatingPlaceholder' - inClass: 'InputDecoration' - changes: - - kind: 'rename' - newName: 'floatingLabelBehavior' - - # Changes made in https://github.com/flutter/flutter/pull/46115 - - title: "Rename to 'floatingLabelBehavior'" - date: 2020-01-15 - element: - uris: [ 'material.dart' ] - constructor: 'collapsed' - inClass: 'InputDecoration' - oneOf: - - if: "hasFloatingPlaceholder == 'true'" - changes: - - kind: 'addParameter' - index: 14 - name: 'floatingLabelBehavior' - style: optional_named - argumentValue: - expression: '{% FloatingLabelBehavior %}.auto' - requiredIf: "hasFloatingPlaceholder == 'true'" - variables: - FloatingLabelBehavior: - kind: 'import' - uris: [ 'material.dart' ] - name: 'FloatingLabelBehavior' - - kind: 'removeParameter' - name: 'hasFloatingPlaceholder' - - if: "hasFloatingPlaceholder == 'false'" - changes: - - kind: 'addParameter' - index: 14 - name: 'floatingLabelBehavior' - style: optional_named - argumentValue: - expression: '{% FloatingLabelBehavior %}.never' - requiredIf: "hasFloatingPlaceholder == 'false'" - variables: - FloatingLabelBehavior: - kind: 'import' - uris: [ 'material.dart' ] - name: 'FloatingLabelBehavior' - - kind: 'removeParameter' - name: 'hasFloatingPlaceholder' - variables: - hasFloatingPlaceholder: - kind: 'fragment' - value: 'arguments[hasFloatingPlaceholder]' - - # Changes made in https://github.com/flutter/flutter/pull/46115 - - title: "Rename to 'floatingLabelBehavior'" - date: 2020-01-15 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'InputDecoration' - oneOf: - - if: "hasFloatingPlaceholder == 'true'" - changes: - - kind: 'addParameter' - index: 14 - name: 'floatingLabelBehavior' - style: optional_named - argumentValue: - expression: '{% FloatingLabelBehavior %}.auto' - requiredIf: "hasFloatingPlaceholder == 'true'" - variables: - FloatingLabelBehavior: - kind: 'import' - uris: [ 'material.dart' ] - name: 'FloatingLabelBehavior' - - kind: 'removeParameter' - name: 'hasFloatingPlaceholder' - - if: "hasFloatingPlaceholder == 'false'" - changes: - - kind: 'addParameter' - index: 14 - name: 'floatingLabelBehavior' - style: optional_named - argumentValue: - expression: '{% FloatingLabelBehavior %}.never' - requiredIf: "hasFloatingPlaceholder == 'false'" - variables: - FloatingLabelBehavior: - kind: 'import' - uris: [ 'material.dart' ] - name: 'FloatingLabelBehavior' - - kind: 'removeParameter' - name: 'hasFloatingPlaceholder' - variables: - hasFloatingPlaceholder: - kind: 'fragment' - value: 'arguments[hasFloatingPlaceholder]' - - # Changes made in https://github.com/flutter/flutter/pull/59127 - - title: "Migrate to 'label'" - date: 2020-07-09 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - field: 'title' - inClass: 'BottomNavigationBarItem' - changes: - - kind: 'rename' - newName: 'label' - - # Changes made in https://github.com/flutter/flutter/pull/59127 - - title: "Migrate to 'label'" - date: 2020-07-09 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - constructor: '' - inClass: 'BottomNavigationBarItem' - changes: - - kind: 'renameParameter' - oldName: 'title' - newName: 'label' - - # Changes made in https://github.com/flutter/flutter/pull/66043 - - title: "Use withKind" - date: 2020-09-17 - element: - uris: [ 'gestures.dart' ] - constructor: '' - inClass: 'VelocityTracker' - oneOf: - - if: "pointerDeviceKind == ''" - changes: - - kind: 'rename' - newName: 'withKind' - - kind: 'addParameter' - index: 0 - name: 'kind' - style: required_positional - argumentValue: - expression: 'PointerDeviceKind.touch' - - if: "pointerDeviceKind != ''" - changes: - - kind: 'rename' - newName: 'withKind' - variables: - pointerDeviceKind: - kind: 'fragment' - value: 'arguments[0]' - - # Changes made in https://github.com/flutter/flutter/pull/72043 - - title: "Migrate to 'maxLengthEnforcement'" - date: 2020-12-13 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'TextFormField' - oneOf: - - if: "maxLengthEnforced == 'true'" - changes: - - kind: 'addParameter' - index: 0 - name: 'maxLengthEnforcement' - style: optional_named - argumentValue: - expression: 'MaxLengthEnforcement.enforce' - requiredIf: "maxLengthEnforced == 'true'" - - kind: 'removeParameter' - name: 'maxLengthEnforced' - - if: "maxLengthEnforced == 'false'" - changes: - - kind: 'addParameter' - index: 0 - name: 'maxLengthEnforcement' - style: optional_named - argumentValue: - expression: 'MaxLengthEnforcement.none' - requiredIf: "maxLengthEnforced == 'false'" - - kind: 'removeParameter' - name: 'maxLengthEnforced' - variables: - maxLengthEnforced: - kind: 'fragment' - value: 'arguments[maxLengthEnforced]' - - # Changes made in https://github.com/flutter/flutter/pull/72043 - - title: "Migrate to 'maxLengthEnforcement'" - date: 2020-12-13 - element: - uris: [ 'material.dart' ] - field: 'maxLengthEnforced' - inClass: 'TextField' - changes: - - kind: 'rename' - newName: 'maxLengthEnforcement' - - # Changes made in https://github.com/flutter/flutter/pull/72043 - - title: "Migrate to 'maxLengthEnforcement'" - date: 2020-12-13 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'TextField' - oneOf: - - if: "maxLengthEnforced == 'true'" - changes: - - kind: 'addParameter' - index: 0 - name: 'maxLengthEnforcement' - style: optional_named - argumentValue: - expression: 'MaxLengthEnforcement.enforce' - requiredIf: "maxLengthEnforced == 'true'" - - kind: 'removeParameter' - name: 'maxLengthEnforced' - - if: "maxLengthEnforced == 'false'" - changes: - - kind: 'addParameter' - index: 0 - name: 'maxLengthEnforcement' - style: optional_named - argumentValue: - expression: 'MaxLengthEnforcement.none' - requiredIf: "maxLengthEnforced == 'false'" - - kind: 'removeParameter' - name: 'maxLengthEnforced' - variables: - maxLengthEnforced: - kind: 'fragment' - value: 'arguments[maxLengthEnforced]' - - # Changes made in https://github.com/flutter/flutter/pull/72043 - - title: "Migrate to 'maxLengthEnforcement'" - date: 2020-12-13 - element: - uris: [ 'cupertino.dart' ] - field: 'maxLengthEnforced' - inClass: 'CupertinoTextField' - changes: - - kind: 'rename' - newName: 'maxLengthEnforcement' - - # Changes made in https://github.com/flutter/flutter/pull/72043 - - title: "Migrate to 'maxLengthEnforcement'" - date: 2020-12-13 - element: - uris: [ 'cupertino.dart' ] - constructor: 'borderless' - inClass: 'CupertinoTextField' - oneOf: - - if: "maxLengthEnforced == 'true'" - changes: - - kind: 'addParameter' - index: 0 - name: 'maxLengthEnforcement' - style: optional_named - argumentValue: - expression: 'MaxLengthEnforcement.enforce' - requiredIf: "maxLengthEnforced == 'true'" - - kind: 'removeParameter' - name: 'maxLengthEnforced' - - if: "maxLengthEnforced == 'false'" - changes: - - kind: 'addParameter' - index: 0 - name: 'maxLengthEnforcement' - style: optional_named - argumentValue: - expression: 'MaxLengthEnforcement.none' - requiredIf: "maxLengthEnforced == 'false'" - - kind: 'removeParameter' - name: 'maxLengthEnforced' - variables: - maxLengthEnforced: - kind: 'fragment' - value: 'arguments[maxLengthEnforced]' - - # Changes made in https://github.com/flutter/flutter/pull/72043 - - title: "Migrate to 'maxLengthEnforcement'" - date: 2020-12-13 - element: - uris: [ 'cupertino.dart' ] - constructor: '' - inClass: 'CupertinoTextField' - oneOf: - - if: "maxLengthEnforced == 'true'" - changes: - - kind: 'addParameter' - index: 0 - name: 'maxLengthEnforcement' - style: optional_named - argumentValue: - expression: 'MaxLengthEnforcement.enforce' - requiredIf: "maxLengthEnforced == 'true'" - - kind: 'removeParameter' - name: 'maxLengthEnforced' - - if: "maxLengthEnforced == 'false'" - changes: - - kind: 'addParameter' - index: 0 - name: 'maxLengthEnforcement' - style: optional_named - argumentValue: - expression: 'MaxLengthEnforcement.none' - requiredIf: "maxLengthEnforced == 'false'" - - kind: 'removeParameter' - name: 'maxLengthEnforced' - variables: - maxLengthEnforced: - kind: 'fragment' - value: 'arguments[maxLengthEnforced]' - - # Changes made in https://github.com/flutter/flutter/pull/68905. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart' ] - method: 'resolveFrom' - inClass: 'MaterialBasedCupertinoThemeData' - changes: - - kind: 'removeParameter' - name: 'nullOk' - - # Changes made in https://github.com/flutter/flutter/pull/68905. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'cupertino.dart' ] - method: 'resolveFrom' - inClass: 'CupertinoTextThemeData' - changes: - - kind: 'removeParameter' - name: 'nullOk' - - # Changes made in https://github.com/flutter/flutter/pull/68905. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'cupertino.dart' ] - method: 'resolveFrom' - inClass: 'NoDefaultCupertinoThemeData' - changes: - - kind: 'removeParameter' - name: 'nullOk' - - # Changes made in https://github.com/flutter/flutter/pull/68905. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'cupertino.dart' ] - method: 'resolveFrom' - inClass: 'CupertinoThemeData' - changes: - - kind: 'removeParameter' - name: 'nullOk' - - # Changes made in https://github.com/flutter/flutter/pull/68736. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'cupertino.dart' ] - method: 'brightnessOf' - inClass: 'CupertinoTheme' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeBrightnessOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68905. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'cupertino.dart' ] - method: 'of' - inClass: 'CupertinoUserInterfaceLevel' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68905. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'cupertino.dart' ] - method: 'resolveFrom' - inClass: 'CupertinoDynamicColor' - changes: - - kind: 'removeParameter' - name: 'nullOk' - - # Changes made in https://github.com/flutter/flutter/pull/68905. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'cupertino.dart' ] - method: 'resolve' - inClass: 'CupertinoDynamicColor' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeResolve' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68925. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'of' - inClass: 'SliverAnimatedList' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68925. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'of' - inClass: 'AnimatedList' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68921. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'invoke' - inClass: 'Actions' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeInvoke' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68921. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'find' - inClass: 'Actions' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeFind' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68921. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'handler' - inClass: 'Actions' - changes: - - kind: 'removeParameter' - name: 'nullOk' - - # Changes made in https://github.com/flutter/flutter/pull/68921. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'of' - inClass: 'Shortcuts' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68917. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'of' - inClass: 'Focus' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68917. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'of' - inClass: 'FocusTraversalGroup' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68917. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'of' - inClass: 'FocusTraversalOrder' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68911. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'localeOf' - inClass: 'Localizations' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeLocaleOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68910. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'of' - inClass: 'Router' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68908. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart' ] - method: 'of' - inClass: 'Scaffold' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68908. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart' ] - method: 'of' - inClass: 'ScaffoldMessenger' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/70726. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'of' - inClass: 'Navigator' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/68736. - - title: "Migrate from 'nullOk'" - date: 2021-01-27 - element: - uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] - method: 'of' - inClass: 'MediaQuery' - oneOf: - - if: "nullOk == 'true'" - changes: - - kind: 'rename' - newName: 'maybeOf' - - kind: 'removeParameter' - name: 'nullOk' - - if: "nullOk == 'false'" - changes: - - kind: 'removeParameter' - name: 'nullOk' - variables: - nullOk: - kind: 'fragment' - value: 'arguments[nullOk]' - - # Changes made in https://github.com/flutter/flutter/pull/44189. - - title: "Rename to 'dependOnInheritedElement'" - date: 2020-12-23 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'inheritFromElement' - inClass: 'Element' - changes: - - kind: 'rename' - newName: 'dependOnInheritedElement' - - # Changes made in https://github.com/flutter/flutter/pull/44189. - - title: "Rename to 'dependOnInheritedWidgetOfExactType'" - date: 2020-09-14 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'inheritFromWidgetOfExactType' - inClass: 'Element' - changes: - - kind: 'rename' - newName: 'dependOnInheritedWidgetOfExactType' - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: 'fragment' - value: 'arguments[0]' - - kind: 'removeParameter' - index: 0 - - # Changes made in https://github.com/flutter/flutter/pull/44189. - - title: "Rename to 'getElementForInheritedWidgetOfExactType'" - date: 2020-09-14 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'ancestorInheritedElementForWidgetOfExactType' - inClass: 'Element' - changes: - - kind: 'rename' - newName: 'getElementForInheritedWidgetOfExactType' - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: 'fragment' - value: 'arguments[0]' - - kind: 'removeParameter' - index: 0 - - # Changes made in https://github.com/flutter/flutter/pull/44189. - - title: "Rename to 'getElementForInheritedWidgetOfExactType'" - date: 2020-12-23 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'ancestorWidgetOfExactType' - inClass: 'Element' - changes: - - kind: 'rename' - newName: 'findAncestorWidgetOfExactType' - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: 'fragment' - value: 'arguments[0]' - - kind: 'removeParameter' - index: 0 - - # Changes made in https://github.com/flutter/flutter/pull/44189. - - title: "Rename to 'findAncestorStateOfType'" - date: 2020-12-23 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'ancestorStateOfType' - inClass: 'Element' - changes: - - kind: 'rename' - newName: 'findAncestorStateOfType' - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: 'fragment' - value: 'arguments[0].typeArguments[0]' - - kind: 'removeParameter' - index: 0 - - # Changes made in https://github.com/flutter/flutter/pull/44189. - - title: "Rename to 'findAncestorRenderObjectOfType'" - date: 2020-12-23 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'ancestorRenderObjectOfType' - inClass: 'Element' - changes: - - kind: 'rename' - newName: 'findAncestorRenderObjectOfType' - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: 'fragment' - value: 'arguments[0].typeArguments[0]' - - kind: 'removeParameter' - index: 0 - - # Changes made in https://github.com/flutter/flutter/pull/44189. - - title: "Rename to 'findAncestorRenderObjectOfType'" - date: 2020-12-23 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'rootAncestorStateOfType' - inClass: 'Element' - changes: - - kind: 'rename' - newName: 'findRootAncestorStateOfType' - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: 'fragment' - value: 'arguments[0].typeArguments[0]' - - kind: 'removeParameter' - index: 0 - - # Changes made in https://github.com/flutter/flutter/pull/26259 - - title: "Rename to 'resizeToAvoidBottomInset'" - date: 2020-12-23 - element: - uris: [ 'material.dart' ] - field: 'resizeToAvoidBottomPadding' - inClass: 'Scaffold' - changes: - - kind: 'rename' - newName: 'resizeToAvoidBottomInset' - - # Changes made in https://github.com/flutter/flutter/pull/26259 - - title: "Rename to 'resizeToAvoidBottomInset'" - date: 2020-12-23 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'Scaffold' - changes: - - kind: 'renameParameter' - oldName: 'resizeToAvoidBottomPadding' - newName: 'resizeToAvoidBottomInset' - - # Change made in https://github.com/flutter/flutter/pull/20649 - # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 - - title: "Replace with 'CupertinoPopupSurface'" - date: 2021-01-07 - bulkApply: false - element: - uris: [ 'cupertino.dart' ] - class: 'CupertinoDialog' - changes: - - kind: 'rename' - newName: 'CupertinoPopupSurface' - - # Change made in https://github.com/flutter/flutter/pull/20649 - # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 - - title: "Replace with 'CupertinoAlertDialog'" - date: 2021-01-07 - bulkApply: false - element: - uris: [ 'cupertino.dart' ] - class: 'CupertinoDialog' - changes: - - kind: 'rename' - newName: 'CupertinoAlertDialog' - - kind: 'renameParameter' - oldName: 'child' - newName: 'content' - - # Changes made in https://github.com/flutter/flutter/pull/61648 - - title: "Migrate to 'autovalidateMode'" - date: 2020-09-02 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - field: 'autovalidate' - inClass: 'Form' - changes: - - kind: 'rename' - newName: 'autovalidateMode' - - # Changes made in https://github.com/flutter/flutter/pull/61648 - - title: "Migrate to 'autovalidateMode'" - date: 2020-09-02 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - constructor: '' - inClass: 'Form' - oneOf: - - if: "autovalidate == 'true'" - changes: - - kind: 'addParameter' - index: 0 - name: 'autovalidateMode' - style: optional_named - argumentValue: - expression: 'AutovalidateMode.always' - requiredIf: "autovalidate == 'true'" - - kind: 'removeParameter' - name: 'autovalidate' - - if: "autovalidate == 'false'" - changes: - - kind: 'addParameter' - index: 0 - name: 'autovalidateMode' - style: optional_named - argumentValue: - expression: 'AutovalidateMode.disabled' - requiredIf: "autovalidate == 'false'" - - kind: 'removeParameter' - name: 'autovalidate' - variables: - autovalidate: - kind: 'fragment' - value: 'arguments[autovalidate]' - - # Changes made in https://github.com/flutter/flutter/pull/61648 - - title: "Migrate to 'autovalidateMode'" - date: 2020-09-02 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - field: 'autovalidate' - inClass: 'FormField' - changes: - - kind: 'rename' - newName: 'autovalidateMode' - - # Changes made in https://github.com/flutter/flutter/pull/61648 - - title: "Migrate to 'autovalidateMode'" - date: 2020-09-02 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - constructor: '' - inClass: 'FormField' - oneOf: - - if: "autovalidate == 'true'" - changes: - - kind: 'addParameter' - index: 0 - name: 'autovalidateMode' - style: optional_named - argumentValue: - expression: 'AutovalidateMode.always' - requiredIf: "autovalidate == 'true'" - - kind: 'removeParameter' - name: 'autovalidate' - - if: "autovalidate == 'false'" - changes: - - kind: 'addParameter' - index: 0 - name: 'autovalidateMode' - style: optional_named - argumentValue: - expression: 'AutovalidateMode.disabled' - requiredIf: "autovalidate == 'false'" - - kind: 'removeParameter' - name: 'autovalidate' - variables: - autovalidate: - kind: 'fragment' - value: 'arguments[autovalidate]' - - # Changes made in https://github.com/flutter/flutter/pull/61648 - - title: "Migrate to 'autovalidateMode'" - date: 2020-09-02 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'TextFormField' - oneOf: - - if: "autovalidate == 'true'" - changes: - - kind: 'addParameter' - index: 0 - name: 'autovalidateMode' - style: optional_named - argumentValue: - expression: 'AutovalidateMode.always' - requiredIf: "autovalidate == 'true'" - - kind: 'removeParameter' - name: 'autovalidate' - - if: "autovalidate == 'false'" - changes: - - kind: 'addParameter' - index: 0 - name: 'autovalidateMode' - style: optional_named - argumentValue: - expression: 'AutovalidateMode.disabled' - requiredIf: "autovalidate == 'false'" - - kind: 'removeParameter' - name: 'autovalidate' - variables: - autovalidate: - kind: 'fragment' - value: 'arguments[autovalidate]' - - # Changes made in https://github.com/flutter/flutter/pull/61648 - - title: "Migrate to 'autovalidateMode'" - date: 2020-09-02 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'DropdownButtonFormField' - oneOf: - - if: "autovalidate == 'true'" - changes: - - kind: 'addParameter' - index: 0 - name: 'autovalidateMode' - style: optional_named - argumentValue: - expression: 'AutovalidateMode.always' - requiredIf: "autovalidate == 'true'" - - kind: 'removeParameter' - name: 'autovalidate' - - if: "autovalidate == 'false'" - changes: - - kind: 'addParameter' - index: 0 - name: 'autovalidateMode' - style: optional_named - argumentValue: - expression: 'AutovalidateMode.disabled' - requiredIf: "autovalidate == 'false'" - - kind: 'removeParameter' - name: 'autovalidate' - variables: - autovalidate: - kind: 'fragment' - value: 'arguments[autovalidate]' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'headline1'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: display4 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'headline1' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'headline2'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: display3 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'headline2' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'headline3'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: display2 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'headline3' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'headline4'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: display1 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'headline4' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'headline5'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: headline - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'headline5' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'headline6'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: title - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'headline6' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'subtitle1'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: subhead - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'subtitle1' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'bodyText1'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: body2 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'bodyText1' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'bodyText2'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: body1 - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'bodyText2' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: "Rename to 'subtitle2'" - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - getter: subtitle - inClass: 'TextTheme' - changes: - - kind: 'rename' - newName: 'subtitle2' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: 'Rename arguments' - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - constructor: '' - inClass: 'TextTheme' - changes: - - kind: 'renameParameter' - oldName: 'display4' - newName: 'headline1' - - kind: 'renameParameter' - oldName: 'display3' - newName: 'headline2' - - kind: 'renameParameter' - oldName: 'display2' - newName: 'headline3' - - kind: 'renameParameter' - oldName: 'display1' - newName: 'headline4' - - kind: 'renameParameter' - oldName: 'headline' - newName: 'headline5' - - kind: 'renameParameter' - oldName: 'title' - newName: 'headline6' - - kind: 'renameParameter' - oldName: 'subhead' - newName: 'subtitle1' - - kind: 'renameParameter' - oldName: 'subtitle' - newName: 'subtitle2' - - kind: 'renameParameter' - oldName: 'body2' - newName: 'bodyText1' - - kind: 'renameParameter' - oldName: 'body1' - newName: 'bodyText2' - - # Changes made in https://github.com/flutter/flutter/pull/48547 - - title: 'Rename arguments' - date: 2020-01-24 - element: - uris: [ 'material.dart' ] - method: 'copyWith' - inClass: 'TextTheme' - changes: - - kind: 'renameParameter' - oldName: 'display4' - newName: 'headline1' - - kind: 'renameParameter' - oldName: 'display3' - newName: 'headline2' - - kind: 'renameParameter' - oldName: 'display2' - newName: 'headline3' - - kind: 'renameParameter' - oldName: 'display1' - newName: 'headline4' - - kind: 'renameParameter' - oldName: 'headline' - newName: 'headline5' - - kind: 'renameParameter' - oldName: 'title' - newName: 'headline6' - - kind: 'renameParameter' - oldName: 'subhead' - newName: 'subtitle1' - - kind: 'renameParameter' - oldName: 'subtitle' - newName: 'subtitle2' - - kind: 'renameParameter' - oldName: 'body2' - newName: 'bodyText1' - - kind: 'renameParameter' - oldName: 'body1' - newName: 'bodyText2' - - # Changes made in https://github.com/flutter/flutter/pull/66305 - - title: "Migrate to 'clipBehavior'" - date: 2020-09-22 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - field: 'overflow' - inClass: 'Stack' - changes: - - kind: 'rename' - newName: 'clipBehavior' - - # Changes made in https://github.com/flutter/flutter/pull/66305 - - title: "Migrate to 'clipBehavior'" - date: 2020-09-22 - element: - uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] - constructor: '' - inClass: 'Stack' - oneOf: - - if: "overflow == 'Overflow.clip'" - changes: - - kind: 'addParameter' - index: 0 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.hardEdge' - requiredIf: "overflow == 'Overflow.clip'" - - kind: 'removeParameter' - name: 'overflow' - - if: "overflow == 'Overflow.visible'" - changes: - - kind: 'addParameter' - index: 0 - name: 'clipBehavior' - style: optional_named - argumentValue: - expression: 'Clip.none' - requiredIf: "overflow == 'Overflow.visible'" - - kind: 'removeParameter' - name: 'overflow' - variables: - overflow: - kind: 'fragment' - value: 'arguments[overflow]' - - # Change made in https://github.com/flutter/flutter/pull/44189. - - title: "Rename to 'dependOnInheritedElement'" - date: 2019-11-22 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - inClass: 'BuildContext' - method: 'inheritFromElement' - changes: - - kind: 'rename' - newName: 'dependOnInheritedElement' - - # Change made in https://github.com/flutter/flutter/pull/44189. - - title: "Migrate to 'dependOnInheritedWidgetOfExactType'" - date: 2019-11-22 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - inClass: 'BuildContext' - method: 'inheritFromWidgetOfExactType' - changes: - - kind: 'rename' - newName: 'dependOnInheritedWidgetOfExactType' - - kind: 'removeParameter' - index: 0 - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: fragment - value: 'arguments[0]' - - # Change made in https://github.com/flutter/flutter/pull/44189. - - title: "Migrate to 'getElementForInheritedWidgetOfExactType'" - date: 2019-11-22 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - inClass: 'BuildContext' - method: 'ancestorInheritedElementForWidgetOfExactType' - changes: - - kind: 'rename' - newName: 'getElementForInheritedWidgetOfExactType' - - kind: 'removeParameter' - index: 0 - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: fragment - value: 'arguments[0]' - - # Change made in https://github.com/flutter/flutter/pull/44189. - - title: "Migrate to 'findAncestorWidgetOfExactType'" - date: 2019-11-22 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - inClass: 'BuildContext' - method: 'ancestorWidgetOfExactType' - changes: - - kind: 'rename' - newName: 'findAncestorWidgetOfExactType' - - kind: 'removeParameter' - index: 0 - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: fragment - value: 'arguments[0]' - - # Change made in https://github.com/flutter/flutter/pull/44189. - - title: "Migrate to 'findAncestorStateOfType'" - date: 2019-11-22 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - inClass: 'BuildContext' - method: 'ancestorStateOfType' - changes: - - kind: 'rename' - newName: 'findAncestorStateOfType' - - kind: 'removeParameter' - index: 0 - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: fragment - value: 'arguments[0].typeArguments[0]' - - # Change made in https://github.com/flutter/flutter/pull/44189. - - title: "Migrate to 'rootAncestorStateOfType'" - date: 2019-11-22 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - inClass: 'BuildContext' - method: 'rootAncestorStateOfType' - changes: - - kind: 'rename' - newName: 'findRootAncestorStateOfType' - - kind: 'removeParameter' - index: 0 - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: fragment - value: 'arguments[0].typeArguments[0]' - - # Change made in https://github.com/flutter/flutter/pull/44189. - - title: "Migrate to 'ancestorRenderObjectOfType'" - date: 2019-11-22 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - inClass: 'BuildContext' - method: 'ancestorRenderObjectOfType' - changes: - - kind: 'rename' - newName: 'findAncestorRenderObjectOfType' - - kind: 'removeParameter' - index: 0 - - kind: 'addTypeParameter' - index: 0 - name: 'T' - argumentValue: - expression: '{% type %}' - variables: - type: - kind: fragment - value: 'arguments[0].typeArguments[0]' - - # Changes made in https://github.com/flutter/flutter/pull/45941 - - title: "Rename to 'deferFirstFrame'" - date: 2020-12-23 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'deferFirstFrameReport' - inClass: 'WidgetsBinding' - changes: - - kind: 'rename' - newName: 'deferFirstFrame' - - # Changes made in https://github.com/flutter/flutter/pull/45941 - - title: "Rename to 'allowFirstFrame'" - date: 2020-12-23 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'allowFirstFrameReport' - inClass: 'WidgetsBinding' - changes: - - kind: 'rename' - newName: 'allowFirstFrame' - - # Changes made in https://github.com/flutter/flutter/pull/44189 - - title: "Rename to 'dependOnInheritedElement'" - date: 2020-12-23 - element: - uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ] - method: 'inheritFromElement' - inClass: 'StatefulElement' - changes: - - kind: 'rename' - newName: 'dependOnInheritedElement' - - # Changes made in https://github.com/flutter/flutter/pull/15303 - - title: "Replace 'child' with 'builder'" - date: 2020-12-17 - element: - uris: [ 'material.dart' ] - function: 'showDialog' - changes: - - kind: 'addParameter' - index: 0 - name: 'builder' - style: optional_named - argumentValue: - expression: '(context) => {% widget %}' - requiredIf: "widget != ''" - variables: - widget: - kind: fragment - value: 'arguments[child]' - - kind: 'removeParameter' - name: 'child' - - # Changes made in https://github.com/flutter/flutter/pull/28602 - - title: "Rename to 'fromMouseEvent'" - date: 2020-12-15 - element: - uris: [ 'gestures.dart' ] - constructor: 'fromHoverEvent' - inClass: 'PointerEnterEvent' - changes: - - kind: 'rename' - newName: 'fromMouseEvent' - - # Changes made in https://github.com/flutter/flutter/pull/28602 - - title: "Rename to 'fromMouseEvent'" - date: 2020-12-15 - element: - uris: [ 'gestures.dart' ] - constructor: 'fromHoverEvent' - inClass: 'PointerExitEvent' - changes: - - kind: 'rename' - newName: 'fromMouseEvent' - - # Changes made in https://github.com/flutter/flutter/pull/41859 - - title: "Remove 'brightness'" - date: 2020-12-10 - element: - uris: [ 'cupertino.dart' ] - constructor: '' - inClass: 'CupertinoTextThemeData' - changes: - - kind: 'removeParameter' - name: 'brightness' - - # Changes made in https://github.com/flutter/flutter/pull/41859 - - title: "Remove 'brightness'" - date: 2020-12-10 - element: - uris: [ 'cupertino.dart' ] - method: 'copyWith' - inClass: 'CupertinoTextThemeData' - changes: - - kind: 'removeParameter' - name: 'brightness' - -# Before adding a new fix: read instructions at the top of this file. \ No newline at end of file diff --git a/packages/flutter/lib/fix_data/README.md b/packages/flutter/lib/fix_data/README.md new file mode 100644 index 000000000000..95358ba378a8 --- /dev/null +++ b/packages/flutter/lib/fix_data/README.md @@ -0,0 +1,43 @@ +## Directory contents + +The `.yaml` files in these directories are used to +define the [`dart fix` framework](https://dart.dev/tools/dart-fix) refactorings +used by the Flutter framework. + +The number of fix rules defined in a file should not exceed 50 for better +maintainability. Searching for `title:` is a given `.yaml` file will account +for the number of fixes. Splitting out fix rules should be done by class. + +When adding a new `.yaml` file, make a copy of `fix_template.yaml`. If the new +file is not for generic library fixes (`fix_material.yaml`), ensure it is +enclosed in an appropriate library directory (`fix_data/fix_material`), and +named after the class. Fix files outside of generic libraries should represent +individual classes (`fix_data/fix_material/fix_app_bar.yaml`). + +See the flutter/packages/flutter/test_fixes directory for the tests that +validate these fix rules. + +To run these tests locally, execute this command in the +flutter/packages/flutter/test_fixes directory. +```sh +dart fix --compare-to-golden +``` + +For more documentation about Data Driven Fixes, see +https://dart.dev/go/data-driven-fixes#test-folder. + +To learn more about how fixes are authored in package:flutter, see +https://github.com/flutter/flutter/wiki/Data-driven-Fixes + +## When making structural changes to this directory + +Note that the tests in this directory are also invoked from external +repositories. Specifically, the CI system for the dart-lang/sdk repo runs these +tests in order to ensure that changes to the dart fix file format do not break +Flutter. + +See [tools/bots/flutter/analyze_flutter_flutter.sh](https://github.com/dart-lang/sdk/blob/main/tools/bots/flutter/analyze_flutter_flutter.sh) +for where the tests are invoked. + +When possible, please coordinate changes to this directory that might affect the +`analyze_flutter_flutter.sh` script. diff --git a/packages/flutter/lib/fix_data/fix_cupertino.yaml b/packages/flutter/lib/fix_data/fix_cupertino.yaml new file mode 100644 index 000000000000..b9e40b7f1e74 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_cupertino.yaml @@ -0,0 +1,298 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are from the Cupertino library. * +version: 1 +transforms: + # Change made in https://github.com/flutter/flutter/pull/20649 + # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 + - title: "Replace with 'CupertinoPopupSurface'" + date: 2021-01-07 + bulkApply: false + element: + uris: [ 'cupertino.dart' ] + class: 'CupertinoDialog' + changes: + - kind: 'rename' + newName: 'CupertinoPopupSurface' + + # Change made in https://github.com/flutter/flutter/pull/20649 + # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 + - title: "Replace with 'CupertinoAlertDialog'" + date: 2021-01-07 + bulkApply: false + element: + uris: [ 'cupertino.dart' ] + class: 'CupertinoDialog' + changes: + - kind: 'rename' + newName: 'CupertinoAlertDialog' + - kind: 'renameParameter' + oldName: 'child' + newName: 'content' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolveFrom' + inClass: 'CupertinoTextThemeData' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolveFrom' + inClass: 'NoDefaultCupertinoThemeData' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolveFrom' + inClass: 'CupertinoThemeData' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68736. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'brightnessOf' + inClass: 'CupertinoTheme' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeBrightnessOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'of' + inClass: 'CupertinoUserInterfaceLevel' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolveFrom' + inClass: 'CupertinoDynamicColor' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolve' + inClass: 'CupertinoDynamicColor' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeResolve' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/72043 + - title: "Migrate to 'maxLengthEnforcement'" + date: 2020-12-13 + element: + uris: [ 'cupertino.dart' ] + field: 'maxLengthEnforced' + inClass: 'CupertinoTextField' + changes: + - kind: 'rename' + newName: 'maxLengthEnforcement' + + # Changes made in https://github.com/flutter/flutter/pull/72043 + - title: "Migrate to 'maxLengthEnforcement'" + date: 2020-12-13 + element: + uris: [ 'cupertino.dart' ] + constructor: 'borderless' + inClass: 'CupertinoTextField' + oneOf: + - if: "maxLengthEnforced == 'true'" + changes: + - kind: 'addParameter' + index: 0 + name: 'maxLengthEnforcement' + style: optional_named + argumentValue: + expression: 'MaxLengthEnforcement.enforce' + requiredIf: "maxLengthEnforced == 'true'" + - kind: 'removeParameter' + name: 'maxLengthEnforced' + - if: "maxLengthEnforced == 'false'" + changes: + - kind: 'addParameter' + index: 0 + name: 'maxLengthEnforcement' + style: optional_named + argumentValue: + expression: 'MaxLengthEnforcement.none' + requiredIf: "maxLengthEnforced == 'false'" + - kind: 'removeParameter' + name: 'maxLengthEnforced' + variables: + maxLengthEnforced: + kind: 'fragment' + value: 'arguments[maxLengthEnforced]' + + # Changes made in https://github.com/flutter/flutter/pull/72043 + - title: "Migrate to 'maxLengthEnforcement'" + date: 2020-12-13 + element: + uris: [ 'cupertino.dart' ] + constructor: '' + inClass: 'CupertinoTextField' + oneOf: + - if: "maxLengthEnforced == 'true'" + changes: + - kind: 'addParameter' + index: 0 + name: 'maxLengthEnforcement' + style: optional_named + argumentValue: + expression: 'MaxLengthEnforcement.enforce' + requiredIf: "maxLengthEnforced == 'true'" + - kind: 'removeParameter' + name: 'maxLengthEnforced' + - if: "maxLengthEnforced == 'false'" + changes: + - kind: 'addParameter' + index: 0 + name: 'maxLengthEnforcement' + style: optional_named + argumentValue: + expression: 'MaxLengthEnforcement.none' + requiredIf: "maxLengthEnforced == 'false'" + - kind: 'removeParameter' + name: 'maxLengthEnforced' + variables: + maxLengthEnforced: + kind: 'fragment' + value: 'arguments[maxLengthEnforced]' + + # Changes made in https://github.com/flutter/flutter/pull/96957 + - title: "Migrate to 'thumbVisibility'" + date: 2022-01-20 + element: + uris: [ 'cupertino.dart' ] + field: 'isAlwaysShown' + inClass: 'CupertinoScrollbar' + changes: + - kind: 'rename' + newName: 'thumbVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/96957 + - title: "Migrate to 'thumbVisibility'" + date: 2022-01-20 + element: + uris: [ 'cupertino.dart' ] + constructor: '' + inClass: 'CupertinoScrollbar' + changes: + - kind: 'renameParameter' + oldName: 'isAlwaysShown' + newName: 'thumbVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/41859 + - title: "Remove 'brightness'" + date: 2020-12-10 + element: + uris: [ 'cupertino.dart' ] + constructor: '' + inClass: 'CupertinoTextThemeData' + changes: + - kind: 'removeParameter' + name: 'brightness' + + # Changes made in https://github.com/flutter/flutter/pull/41859 + - title: "Remove 'brightness'" + date: 2020-12-10 + element: + uris: [ 'cupertino.dart' ] + method: 'copyWith' + inClass: 'CupertinoTextThemeData' + changes: + - kind: 'removeParameter' + name: 'brightness' + + # Changes made in https://github.com/flutter/flutter/pull/78588 + - title: "Migrate to 'buildOverscrollIndicator'" + date: 2021-03-18 + element: + uris: [ 'cupertino.dart' ] + method: 'buildViewportChrome' + inClass: 'CupertinoScrollBehavior' + changes: + - kind: 'rename' + newName: 'buildOverscrollIndicator' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_gestures.yaml b/packages/flutter/lib/fix_data/fix_gestures.yaml new file mode 100644 index 000000000000..efbcddce17b5 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_gestures.yaml @@ -0,0 +1,478 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are [for CLASS] from the library. * +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/28602 + - title: "Rename to 'fromMouseEvent'" + date: 2020-12-15 + element: + uris: [ 'gestures.dart' ] + constructor: 'fromHoverEvent' + inClass: 'PointerEnterEvent' + changes: + - kind: 'rename' + newName: 'fromMouseEvent' + + # Changes made in https://github.com/flutter/flutter/pull/28602 + - title: "Rename to 'fromMouseEvent'" + date: 2020-12-15 + element: + uris: [ 'gestures.dart' ] + constructor: 'fromHoverEvent' + inClass: 'PointerExitEvent' + changes: + - kind: 'rename' + newName: 'fromMouseEvent' + + # Changes made in https://github.com/flutter/flutter/pull/66043 + - title: "Use withKind" + date: 2020-09-17 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'VelocityTracker' + oneOf: + - if: "pointerDeviceKind == ''" + changes: + - kind: 'rename' + newName: 'withKind' + - kind: 'addParameter' + index: 0 + name: 'kind' + style: required_positional + argumentValue: + expression: 'PointerDeviceKind.touch' + - if: "pointerDeviceKind != ''" + changes: + - kind: 'rename' + newName: 'withKind' + variables: + pointerDeviceKind: + kind: 'fragment' + value: 'arguments[0]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'ScaleGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'MultiTapGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 4 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'DoubleTapGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'DelayedMultiDragGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 4 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'VerticalMultiDragGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'HorizontalMultiDragGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'ImmediateMultiDragGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'MultiDragGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'LongPressGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 4 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'ForcePressGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 6 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'EagerGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 2 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'PrimaryPointerGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 6 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'OneSequenceGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'GestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'HorizontalDragGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'VerticalDragGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 3 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + + # Changes made in https://github.com/flutter/flutter/pull/81858 + - title: "Migrate to 'supportedDevices'" + date: 2021-05-04 + element: + uris: [ 'gestures.dart' ] + constructor: '' + inClass: 'DragGestureRecognizer' + oneOf: + - if: "kind != ''" + changes: + - kind: 'addParameter' + index: 5 + name: 'supportedDevices' + style: optional_named + argumentValue: + expression: '{{% kind %}}' + requiredIf: "kind != ''" + - kind: 'removeParameter' + name: 'kind' + variables: + kind: + kind: 'fragment' + value: 'arguments[kind]' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_material/fix_app_bar.yaml b/packages/flutter/lib/fix_data/fix_material/fix_app_bar.yaml new file mode 100644 index 000000000000..4a6a6509663d --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_material/fix_app_bar.yaml @@ -0,0 +1,150 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are for AppBar from the Material library. * +# For fixes to +# * AppBarTheme: fix_app_bar_theme.yaml +# * ColorScheme: fix_color_scheme.yaml +# * Material (general): fix_material.yaml +# * SliverAppBar: fix_sliver_app_bar.yaml +# * TextTheme: fix_text_theme.yaml +# * ThemeData: fix_theme_data.yaml +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Remove 'backwardsCompatibility'" + date: 2020-07-12 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'AppBar' + changes: + - kind: 'removeParameter' + name: 'backwardsCompatibility' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'toolbarTextStyle' & 'titleTextStyle'" + date: 2020-07-12 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'AppBar' + changes: + - kind: 'addParameter' + index: 24 + name: 'toolbarTextStyle' + style: optional_named + argumentValue: + expression: '{% textTheme %}.bodyText2' + requiredIf: "textTheme != ''" + - kind: 'addParameter' + index: 25 + name: 'titleTextStyle' + style: optional_named + argumentValue: + expression: '{% textTheme %}.headline6' + requiredIf: "textTheme != ''" + - kind: 'removeParameter' + name: 'textTheme' + variables: + textTheme: + kind: 'fragment' + value: 'arguments[textTheme]' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'toolbarTextStyle'" + date: 2021-07-12 + # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 + bulkApply: false + element: + uris: [ 'material.dart' ] + field: 'textTheme' + inClass: 'AppBar' + changes: + - kind: 'rename' + newName: 'toolbarTextStyle' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'titleTextStyle'" + date: 2021-07-12 + # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 + bulkApply: false + element: + uris: [ 'material.dart' ] + field: 'textTheme' + inClass: 'AppBar' + changes: + - kind: 'rename' + newName: 'titleTextStyle' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'systemOverlayStyle'" + date: 2020-07-12 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'AppBar' + oneOf: + - if: "brightness == 'Brightness.dark'" + changes: + - kind: 'addParameter' + index: 27 + name: 'systemOverlayStyle' + style: optional_named + argumentValue: + expression: '{% SystemUiOverlayStyle %}.light' + requiredIf: "brightness == 'Brightness.dark'" + variables: + SystemUiOverlayStyle: + kind: 'import' + uris: [ 'services.dart' ] + name: 'SystemUiOverlayStyle' + - kind: 'removeParameter' + name: 'brightness' + - if: "brightness == 'Brightness.light'" + changes: + - kind: 'addParameter' + index: 27 + name: 'systemOverlayStyle' + style: optional_named + argumentValue: + expression: '{% SystemUiOverlayStyle %}.dark' + requiredIf: "brightness == 'Brightness.light'" + variables: + SystemUiOverlayStyle: + kind: 'import' + uris: [ 'services.dart' ] + name: 'SystemUiOverlayStyle' + - kind: 'removeParameter' + name: 'brightness' + variables: + brightness: + kind: 'fragment' + value: 'arguments[brightness]' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'systemOverlayStyle'" + date: 2021-07-12 + element: + uris: [ 'material.dart' ] + field: 'brightness' + inClass: 'AppBar' + changes: + - kind: 'rename' + newName: 'systemOverlayStyle' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_material/fix_app_bar_theme.yaml b/packages/flutter/lib/fix_data/fix_material/fix_app_bar_theme.yaml new file mode 100644 index 000000000000..1c0ea6537a04 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_material/fix_app_bar_theme.yaml @@ -0,0 +1,246 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are for AppBarTheme from the Material library. * +# For fixes to +# * AppBar: fix_app_bar.yaml +# * ColorScheme: fix_color_scheme.yaml +# * Material (general): fix_material.yaml +# * SliverAppBar: fix_sliver_app_bar.yaml +# * TextTheme: fix_text_theme.yaml +# * ThemeData: fix_theme_data.yaml +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'systemOverlayStyle'" + date: 2021-07-12 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'AppBarTheme' + oneOf: + - if: "brightness == 'Brightness.dark'" + changes: + - kind: 'addParameter' + index: 14 + name: 'systemOverlayStyle' + style: optional_named + argumentValue: + expression: '{% SystemUiOverlayStyle %}.light' + requiredIf: "brightness == 'Brightness.dark'" + variables: + SystemUiOverlayStyle: + kind: 'import' + uris: [ 'services.dart' ] + name: 'SystemUiOverlayStyle' + - kind: 'removeParameter' + name: 'brightness' + - if: "brightness == 'Brightness.light'" + changes: + - kind: 'addParameter' + index: 14 + name: 'systemOverlayStyle' + style: optional_named + argumentValue: + expression: '{% SystemUiOverlayStyle %}.dark' + requiredIf: "brightness == 'Brightness.light'" + variables: + SystemUiOverlayStyle: + kind: 'import' + uris: [ 'services.dart' ] + name: 'SystemUiOverlayStyle' + - kind: 'removeParameter' + name: 'brightness' + variables: + brightness: + kind: 'fragment' + value: 'arguments[brightness]' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'systemOverlayStyle'" + date: 2020-07-12 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'AppBarTheme' + oneOf: + - if: "brightness == 'Brightness.dark'" + changes: + - kind: 'addParameter' + index: 14 + name: 'systemOverlayStyle' + style: optional_named + argumentValue: + expression: '{% SystemUiOverlayStyle %}.light' + requiredIf: "brightness == 'Brightness.dark'" + variables: + SystemUiOverlayStyle: + kind: 'import' + uris: [ 'services.dart' ] + name: 'SystemUiOverlayStyle' + - kind: 'removeParameter' + name: 'brightness' + - if: "brightness == 'Brightness.light'" + changes: + - kind: 'addParameter' + index: 14 + name: 'systemOverlayStyle' + style: optional_named + argumentValue: + expression: '{% SystemUiOverlayStyle %}.dark' + requiredIf: "brightness == 'Brightness.light'" + variables: + SystemUiOverlayStyle: + kind: 'import' + uris: [ 'services.dart' ] + name: 'SystemUiOverlayStyle' + - kind: 'removeParameter' + name: 'brightness' + variables: + brightness: + kind: 'fragment' + value: 'arguments[brightness]' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'systemOverlayStyle'" + date: 2021-07-12 + element: + uris: [ 'material.dart' ] + field: 'brightness' + inClass: 'AppBarTheme' + changes: + - kind: 'rename' + newName: 'systemOverlayStyle' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'toolbarTextStyle'" + date: 2021-07-12 + # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 + bulkApply: false + element: + uris: [ 'material.dart' ] + field: 'textTheme' + inClass: 'AppBarTheme' + changes: + - kind: 'rename' + newName: 'toolbarTextStyle' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'titleTextStyle'" + date: 2021-07-12 + # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 + bulkApply: false + element: + uris: [ 'material.dart' ] + field: 'textTheme' + inClass: 'AppBarTheme' + changes: + - kind: 'rename' + newName: 'titleTextStyle' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'toolbarTextStyle' & 'titleTextStyle'" + date: 2021-07-12 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'AppBarTheme' + changes: + - kind: 'addParameter' + index: 12 + name: 'toolbarTextStyle' + style: optional_named + argumentValue: + expression: '{% textTheme %}.bodyText2' + requiredIf: "textTheme != ''" + - kind: 'addParameter' + index: 13 + name: 'titleTextStyle' + style: optional_named + argumentValue: + expression: '{% textTheme %}.headline6' + requiredIf: "textTheme != ''" + - kind: 'removeParameter' + name: 'textTheme' + variables: + textTheme: + kind: 'fragment' + value: 'arguments[textTheme]' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'toolbarTextStyle' & 'titleTextStyle'" + date: 2020-07-12 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'AppBarTheme' + changes: + - kind: 'addParameter' + index: 13 + name: 'toolbarTextStyle' + style: optional_named + argumentValue: + expression: '{% textTheme %}.bodyText2' + requiredIf: "textTheme != ''" + - kind: 'addParameter' + index: 14 + name: 'titleTextStyle' + style: optional_named + argumentValue: + expression: '{% textTheme %}.headline6' + requiredIf: "textTheme != ''" + - kind: 'removeParameter' + name: 'textTheme' + variables: + textTheme: + kind: 'fragment' + value: 'arguments[textTheme]' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'backgroundColor'" + date: 2021-07-12 + element: + uris: [ 'material.dart' ] + getter: color + inClass: 'AppBarTheme' + changes: + - kind: 'rename' + newName: 'backgroundColor' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Remove 'backwardsCompatibility'" + date: 2021-07-12 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'AppBarTheme' + changes: + - kind: 'removeParameter' + name: 'backwardsCompatibility' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Remove 'backwardsCompatibility'" + date: 2020-07-12 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'AppBarTheme' + changes: + - kind: 'removeParameter' + name: 'backwardsCompatibility' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_material/fix_color_scheme.yaml b/packages/flutter/lib/fix_data/fix_material/fix_color_scheme.yaml new file mode 100644 index 000000000000..6e7c3d18a36c --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_material/fix_color_scheme.yaml @@ -0,0 +1,129 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are for ColorScheme from the Material library. * +# For fixes to +# * AppBar: fix_app_bar.yaml +# * AppBarTheme: fix_app_bar_theme.yaml +# * Material (general): fix_material.yaml +# * SliverAppBar: fix_sliver_app_bar.yaml +# * TextTheme: fix_text_theme.yaml +# * ThemeData: fix_theme_data.yaml +version: 1 +transforms: + + # Changes made in https://github.com/flutter/flutter/pull/93427 + - title: "Remove 'primaryVariant' and 'secondaryVariant'" + date: 2021-11-19 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ColorScheme' + changes: + - kind: 'removeParameter' + name: 'primaryVariant' + - kind: 'removeParameter' + name: 'secondaryVariant' + + # Changes made in https://github.com/flutter/flutter/pull/93427 + - title: "Remove 'primaryVariant' and 'secondaryVariant'" + date: 2021-11-19 + element: + uris: [ 'material.dart' ] + constructor: 'light' + inClass: 'ColorScheme' + changes: + - kind: 'removeParameter' + name: 'primaryVariant' + - kind: 'removeParameter' + name: 'secondaryVariant' + + # Changes made in https://github.com/flutter/flutter/pull/93427 + - title: "Remove 'primaryVariant' and 'secondaryVariant'" + date: 2021-11-19 + element: + uris: [ 'material.dart' ] + constructor: 'dark' + inClass: 'ColorScheme' + changes: + - kind: 'removeParameter' + name: 'primaryVariant' + - kind: 'removeParameter' + name: 'secondaryVariant' + + # Changes made in https://github.com/flutter/flutter/pull/93427 + - title: "Remove 'primaryVariant' and 'secondaryVariant'" + date: 2021-11-19 + element: + uris: [ 'material.dart' ] + constructor: 'highContrastLight' + inClass: 'ColorScheme' + changes: + - kind: 'removeParameter' + name: 'primaryVariant' + - kind: 'removeParameter' + name: 'secondaryVariant' + + # Changes made in https://github.com/flutter/flutter/pull/93427 + - title: "Remove 'primaryVariant' and 'secondaryVariant'" + date: 2021-11-19 + element: + uris: [ 'material.dart' ] + constructor: 'highContrastDark' + inClass: 'ColorScheme' + changes: + - kind: 'removeParameter' + name: 'primaryVariant' + - kind: 'removeParameter' + name: 'secondaryVariant' + + # Changes made in https://github.com/flutter/flutter/pull/93427 + - title: "Remove 'primaryVariant' and 'secondaryVariant'" + date: 2021-11-19 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ColorScheme' + changes: + - kind: 'removeParameter' + name: 'primaryVariant' + - kind: 'removeParameter' + name: 'secondaryVariant' + + # Changes made in https://github.com/flutter/flutter/pull/93427 + - title: "Migrate 'primaryVariant' to 'primaryContainer'" + date: 2021-11-19 + element: + uris: [ 'material.dart' ] + getter: 'primaryVariant' + inClass: 'ColorScheme' + changes: + - kind: 'rename' + newName: 'primaryContainer' + + # Changes made in https://github.com/flutter/flutter/pull/93427 + - title: "Migrate 'secondaryVariant' to 'secondaryContainer'" + date: 2021-11-19 + element: + uris: [ 'material.dart' ] + getter: 'secondaryVariant' + inClass: 'ColorScheme' + changes: + - kind: 'rename' + newName: 'secondaryContainer' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_material/fix_material.yaml b/packages/flutter/lib/fix_data/fix_material/fix_material.yaml new file mode 100644 index 000000000000..0359c8da87f0 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_material/fix_material.yaml @@ -0,0 +1,900 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are from the Material library. * +# For fixes to +# * AppBar: fix_app_bar.yaml +# * AppBarTheme: fix_app_bar_theme.yaml +# * ColorScheme: fix_color_scheme.yaml +# * SliverAppBar: fix_sliver_app_bar.yaml +# * TextTheme: fix_text_theme.yaml +# * ThemeData: fix_theme_data.yaml +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/15303 + - title: "Replace 'child' with 'builder'" + date: 2020-12-17 + element: + uris: [ 'material.dart' ] + function: 'showDialog' + changes: + - kind: 'addParameter' + index: 0 + name: 'builder' + style: optional_named + argumentValue: + expression: '(context) => {% widget %}' + requiredIf: "widget != ''" + variables: + widget: + kind: fragment + value: 'arguments[child]' + - kind: 'removeParameter' + name: 'child' + + # Changes made in https://github.com/flutter/flutter/pull/61648 + - title: "Migrate to 'autovalidateMode'" + date: 2020-09-02 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'TextFormField' + oneOf: + - if: "autovalidate == 'true'" + changes: + - kind: 'addParameter' + index: 0 + name: 'autovalidateMode' + style: optional_named + argumentValue: + expression: 'AutovalidateMode.always' + requiredIf: "autovalidate == 'true'" + - kind: 'removeParameter' + name: 'autovalidate' + - if: "autovalidate == 'false'" + changes: + - kind: 'addParameter' + index: 0 + name: 'autovalidateMode' + style: optional_named + argumentValue: + expression: 'AutovalidateMode.disabled' + requiredIf: "autovalidate == 'false'" + - kind: 'removeParameter' + name: 'autovalidate' + variables: + autovalidate: + kind: 'fragment' + value: 'arguments[autovalidate]' + + # Changes made in https://github.com/flutter/flutter/pull/61648 + - title: "Migrate to 'autovalidateMode'" + date: 2020-09-02 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'DropdownButtonFormField' + oneOf: + - if: "autovalidate == 'true'" + changes: + - kind: 'addParameter' + index: 0 + name: 'autovalidateMode' + style: optional_named + argumentValue: + expression: 'AutovalidateMode.always' + requiredIf: "autovalidate == 'true'" + - kind: 'removeParameter' + name: 'autovalidate' + - if: "autovalidate == 'false'" + changes: + - kind: 'addParameter' + index: 0 + name: 'autovalidateMode' + style: optional_named + argumentValue: + expression: 'AutovalidateMode.disabled' + requiredIf: "autovalidate == 'false'" + - kind: 'removeParameter' + name: 'autovalidate' + variables: + autovalidate: + kind: 'fragment' + value: 'arguments[autovalidate]' + + # Changes made in https://github.com/flutter/flutter/pull/26259 + - title: "Rename to 'resizeToAvoidBottomInset'" + date: 2020-12-23 + element: + uris: [ 'material.dart' ] + field: 'resizeToAvoidBottomPadding' + inClass: 'Scaffold' + changes: + - kind: 'rename' + newName: 'resizeToAvoidBottomInset' + + # Changes made in https://github.com/flutter/flutter/pull/26259 + - title: "Rename to 'resizeToAvoidBottomInset'" + date: 2020-12-23 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'Scaffold' + changes: + - kind: 'renameParameter' + oldName: 'resizeToAvoidBottomPadding' + newName: 'resizeToAvoidBottomInset' + + # Changes made in https://github.com/flutter/flutter/pull/68908. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart' ] + method: 'of' + inClass: 'Scaffold' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68908. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart' ] + method: 'of' + inClass: 'ScaffoldMessenger' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart' ] + method: 'resolveFrom' + inClass: 'MaterialBasedCupertinoThemeData' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/72043 + - title: "Migrate to 'maxLengthEnforcement'" + date: 2020-12-13 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'TextFormField' + oneOf: + - if: "maxLengthEnforced == 'true'" + changes: + - kind: 'addParameter' + index: 0 + name: 'maxLengthEnforcement' + style: optional_named + argumentValue: + expression: 'MaxLengthEnforcement.enforce' + requiredIf: "maxLengthEnforced == 'true'" + - kind: 'removeParameter' + name: 'maxLengthEnforced' + - if: "maxLengthEnforced == 'false'" + changes: + - kind: 'addParameter' + index: 0 + name: 'maxLengthEnforcement' + style: optional_named + argumentValue: + expression: 'MaxLengthEnforcement.none' + requiredIf: "maxLengthEnforced == 'false'" + - kind: 'removeParameter' + name: 'maxLengthEnforced' + variables: + maxLengthEnforced: + kind: 'fragment' + value: 'arguments[maxLengthEnforced]' + + # Changes made in https://github.com/flutter/flutter/pull/72043 + - title: "Migrate to 'maxLengthEnforcement'" + date: 2020-12-13 + element: + uris: [ 'material.dart' ] + field: 'maxLengthEnforced' + inClass: 'TextField' + changes: + - kind: 'rename' + newName: 'maxLengthEnforcement' + + # Changes made in https://github.com/flutter/flutter/pull/72043 + - title: "Migrate to 'maxLengthEnforcement'" + date: 2020-12-13 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'TextField' + oneOf: + - if: "maxLengthEnforced == 'true'" + changes: + - kind: 'addParameter' + index: 0 + name: 'maxLengthEnforcement' + style: optional_named + argumentValue: + expression: 'MaxLengthEnforcement.enforce' + requiredIf: "maxLengthEnforced == 'true'" + - kind: 'removeParameter' + name: 'maxLengthEnforced' + - if: "maxLengthEnforced == 'false'" + changes: + - kind: 'addParameter' + index: 0 + name: 'maxLengthEnforcement' + style: optional_named + argumentValue: + expression: 'MaxLengthEnforcement.none' + requiredIf: "maxLengthEnforced == 'false'" + - kind: 'removeParameter' + name: 'maxLengthEnforced' + variables: + maxLengthEnforced: + kind: 'fragment' + value: 'arguments[maxLengthEnforced]' + + # Changes made in https://github.com/flutter/flutter/pull/65246 + - title: "Remove 'disabledThumbGapWidth'" + date: 2020-11-17 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'RectangularSliderTrackShape' + changes: + - kind: 'removeParameter' + name: 'disabledThumbGapWidth' + + # Changes made in https://github.com/flutter/flutter/pull/46115 + - title: "Migrate to 'floatingLabelBehavior'" + date: 2020-01-15 + element: + uris: [ 'material.dart' ] + field: 'hasFloatingPlaceholder' + inClass: 'InputDecorationTheme' + changes: + - kind: 'rename' + newName: 'floatingLabelBehavior' + + # Changes made in https://github.com/flutter/flutter/pull/46115 + - title: "Migrate to 'floatingLabelBehavior'" + date: 2020-01-15 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'InputDecorationTheme' + oneOf: + - if: "hasFloatingPlaceholder == 'true'" + changes: + - kind: 'addParameter' + index: 14 + name: 'floatingLabelBehavior' + style: optional_named + argumentValue: + expression: '{% FloatingLabelBehavior %}.auto' + requiredIf: "hasFloatingPlaceholder == 'true'" + variables: + FloatingLabelBehavior: + kind: 'import' + uris: [ 'material.dart' ] + name: 'FloatingLabelBehavior' + - kind: 'removeParameter' + name: 'hasFloatingPlaceholder' + - if: "hasFloatingPlaceholder == 'false'" + changes: + - kind: 'addParameter' + index: 14 + name: 'floatingLabelBehavior' + style: optional_named + argumentValue: + expression: '{% FloatingLabelBehavior %}.never' + requiredIf: "hasFloatingPlaceholder == 'false'" + variables: + FloatingLabelBehavior: + kind: 'import' + uris: [ 'material.dart' ] + name: 'FloatingLabelBehavior' + - kind: 'removeParameter' + name: 'hasFloatingPlaceholder' + variables: + hasFloatingPlaceholder: + kind: 'fragment' + value: 'arguments[hasFloatingPlaceholder]' + + # Changes made in https://github.com/flutter/flutter/pull/46115 + - title: "Migrate to 'floatingLabelBehavior'" + date: 2020-01-15 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'InputDecorationTheme' + oneOf: + - if: "hasFloatingPlaceholder == 'true'" + changes: + - kind: 'addParameter' + index: 14 + name: 'floatingLabelBehavior' + style: optional_named + argumentValue: + expression: '{% FloatingLabelBehavior %}.auto' + requiredIf: "hasFloatingPlaceholder == 'true'" + variables: + FloatingLabelBehavior: + kind: 'import' + uris: [ 'material.dart' ] + name: 'FloatingLabelBehavior' + - kind: 'removeParameter' + name: 'hasFloatingPlaceholder' + - if: "hasFloatingPlaceholder == 'false'" + changes: + - kind: 'addParameter' + index: 14 + name: 'floatingLabelBehavior' + style: optional_named + argumentValue: + expression: '{% FloatingLabelBehavior %}.never' + requiredIf: "hasFloatingPlaceholder == 'false'" + variables: + FloatingLabelBehavior: + kind: 'import' + uris: [ 'material.dart' ] + name: 'FloatingLabelBehavior' + - kind: 'removeParameter' + name: 'hasFloatingPlaceholder' + variables: + hasFloatingPlaceholder: + kind: 'fragment' + value: 'arguments[hasFloatingPlaceholder]' + + # Changes made in https://github.com/flutter/flutter/pull/46115 + - title: "Migrate to 'floatingLabelBehavior'" + date: 2020-01-15 + element: + uris: [ 'material.dart' ] + field: 'hasFloatingPlaceholder' + inClass: 'InputDecoration' + changes: + - kind: 'rename' + newName: 'floatingLabelBehavior' + + # Changes made in https://github.com/flutter/flutter/pull/46115 + - title: "Rename to 'floatingLabelBehavior'" + date: 2020-01-15 + element: + uris: [ 'material.dart' ] + constructor: 'collapsed' + inClass: 'InputDecoration' + oneOf: + - if: "hasFloatingPlaceholder == 'true'" + changes: + - kind: 'addParameter' + index: 14 + name: 'floatingLabelBehavior' + style: optional_named + argumentValue: + expression: '{% FloatingLabelBehavior %}.auto' + requiredIf: "hasFloatingPlaceholder == 'true'" + variables: + FloatingLabelBehavior: + kind: 'import' + uris: [ 'material.dart' ] + name: 'FloatingLabelBehavior' + - kind: 'removeParameter' + name: 'hasFloatingPlaceholder' + - if: "hasFloatingPlaceholder == 'false'" + changes: + - kind: 'addParameter' + index: 14 + name: 'floatingLabelBehavior' + style: optional_named + argumentValue: + expression: '{% FloatingLabelBehavior %}.never' + requiredIf: "hasFloatingPlaceholder == 'false'" + variables: + FloatingLabelBehavior: + kind: 'import' + uris: [ 'material.dart' ] + name: 'FloatingLabelBehavior' + - kind: 'removeParameter' + name: 'hasFloatingPlaceholder' + variables: + hasFloatingPlaceholder: + kind: 'fragment' + value: 'arguments[hasFloatingPlaceholder]' + + # Changes made in https://github.com/flutter/flutter/pull/46115 + - title: "Rename to 'floatingLabelBehavior'" + date: 2020-01-15 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'InputDecoration' + oneOf: + - if: "hasFloatingPlaceholder == 'true'" + changes: + - kind: 'addParameter' + index: 14 + name: 'floatingLabelBehavior' + style: optional_named + argumentValue: + expression: '{% FloatingLabelBehavior %}.auto' + requiredIf: "hasFloatingPlaceholder == 'true'" + variables: + FloatingLabelBehavior: + kind: 'import' + uris: [ 'material.dart' ] + name: 'FloatingLabelBehavior' + - kind: 'removeParameter' + name: 'hasFloatingPlaceholder' + - if: "hasFloatingPlaceholder == 'false'" + changes: + - kind: 'addParameter' + index: 14 + name: 'floatingLabelBehavior' + style: optional_named + argumentValue: + expression: '{% FloatingLabelBehavior %}.never' + requiredIf: "hasFloatingPlaceholder == 'false'" + variables: + FloatingLabelBehavior: + kind: 'import' + uris: [ 'material.dart' ] + name: 'FloatingLabelBehavior' + - kind: 'removeParameter' + name: 'hasFloatingPlaceholder' + variables: + hasFloatingPlaceholder: + kind: 'fragment' + value: 'arguments[hasFloatingPlaceholder]' + + # Changes made in https://github.com/flutter/flutter/pull/96115 + - title: "Migrate 'Icons.pie_chart_outlined' to 'Icons.pie_chart_outline'" + date: 2022-01-04 + element: + uris: [ 'material.dart' ] + field: 'pie_chart_outlined' + inClass: 'Icons' + changes: + - kind: 'rename' + newName: 'pie_chart_outline' + + # Changes made in https://github.com/flutter/flutter/pull/96957 + - title: "Migrate to 'thumbVisibility'" + date: 2022-01-20 + element: + uris: [ 'material.dart' ] + field: 'isAlwaysShown' + inClass: 'Scrollbar' + changes: + - kind: 'rename' + newName: 'thumbVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/96957 + - title: "Migrate to 'thumbVisibility'" + date: 2022-01-20 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'Scrollbar' + changes: + - kind: 'renameParameter' + oldName: 'isAlwaysShown' + newName: 'thumbVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/96957 + - title: "Migrate to 'thumbVisibility'" + date: 2022-01-20 + element: + uris: [ 'material.dart' ] + field: 'isAlwaysShown' + inClass: 'ScrollbarThemeData' + changes: + - kind: 'rename' + newName: 'thumbVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/96957 + - title: "Migrate to 'thumbVisibility'" + date: 2022-01-20 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ScrollbarThemeData' + changes: + - kind: 'renameParameter' + oldName: 'isAlwaysShown' + newName: 'thumbVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/96957 + - title: "Migrate to 'thumbVisibility'" + date: 2022-01-20 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ScrollbarThemeData' + changes: + - kind: 'renameParameter' + oldName: 'isAlwaysShown' + newName: 'thumbVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/96174 + - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" + date: 2022-01-05 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'Chip' + changes: + - kind: 'addParameter' + index: 9 + name: 'deleteButtonTooltipMessage' + style: optional_named + argumentValue: + expression: "''" + requiredIf: "useDeleteButtonTooltip == 'false' && deleteButtonTooltipMessage == ''" + - kind: 'removeParameter' + name: 'useDeleteButtonTooltip' + variables: + useDeleteButtonTooltip: + kind: 'fragment' + value: 'arguments[useDeleteButtonTooltip]' + deleteButtonTooltipMessage: + kind: 'fragment' + value: 'arguments[deleteButtonTooltipMessage]' + + # Changes made in https://github.com/flutter/flutter/pull/96174 + - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" + date: 2022-01-05 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'InputChip' + changes: + - kind: 'addParameter' + index: 9 + name: 'deleteButtonTooltipMessage' + style: optional_named + argumentValue: + expression: "''" + requiredIf: "useDeleteButtonTooltip == 'false' && deleteButtonTooltipMessage == ''" + - kind: 'removeParameter' + name: 'useDeleteButtonTooltip' + variables: + useDeleteButtonTooltip: + kind: 'fragment' + value: 'arguments[useDeleteButtonTooltip]' + deleteButtonTooltipMessage: + kind: 'fragment' + value: 'arguments[deleteButtonTooltipMessage]' + + # Changes made in https://github.com/flutter/flutter/pull/96174 + - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" + date: 2022-01-05 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'RawChip' + changes: + - kind: 'addParameter' + index: 9 + name: 'deleteButtonTooltipMessage' + style: optional_named + argumentValue: + expression: "''" + requiredIf: "useDeleteButtonTooltip == 'false' && deleteButtonTooltipMessage == ''" + - kind: 'removeParameter' + name: 'useDeleteButtonTooltip' + variables: + useDeleteButtonTooltip: + kind: 'fragment' + value: 'arguments[useDeleteButtonTooltip]' + deleteButtonTooltipMessage: + kind: 'fragment' + value: 'arguments[deleteButtonTooltipMessage]' + + # Changes made in https://github.com/flutter/flutter/pull/96174 + - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" + date: 2022-01-05 + element: + uris: [ 'material.dart' ] + field: 'useDeleteButtonTooltip' + inClass: 'Chip' + changes: + - kind: 'rename' + newName: 'deleteButtonTooltipMessage' + + # Changes made in https://github.com/flutter/flutter/pull/96174 + - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" + date: 2022-01-05 + element: + uris: [ 'material.dart' ] + field: 'useDeleteButtonTooltip' + inClass: 'InputChip' + changes: + - kind: 'rename' + newName: 'deleteButtonTooltipMessage' + + # Changes made in https://github.com/flutter/flutter/pull/96174 + - title: "Migrate 'useDeleteButtonTooltip' to 'deleteButtonTooltipMessage'" + date: 2022-01-05 + element: + uris: [ 'material.dart' ] + field: 'useDeleteButtonTooltip' + inClass: 'RawChip' + changes: + - kind: 'rename' + newName: 'deleteButtonTooltipMessage' + + # Changes made in https://github.com/flutter/flutter/pull/105291 + - title: "Migrate 'ElevatedButton.styleFrom(primary)' to 'ElevatedButton.styleFrom(backgroundColor)'" + date: 2022-05-27 + element: + uris: [ 'material.dart' ] + method: 'styleFrom' + inClass: 'ElevatedButton' + changes: + - kind: 'addParameter' + index: 1 + name: 'backgroundColor' + style: optional_named + argumentValue: + expression: '{% primary %}' + requiredIf: "primary != ''" + - kind: 'removeParameter' + name: 'primary' + variables: + primary: + kind: 'fragment' + value: 'arguments[primary]' + + # Changes made in https://github.com/flutter/flutter/pull/105291 + - title: "Migrate 'ElevatedButton.styleFrom(onPrimary)' to 'ElevatedButton.styleFrom(foregroundColor)'" + date: 2022-05-27 + element: + uris: [ 'material.dart' ] + method: 'styleFrom' + inClass: 'ElevatedButton' + changes: + - kind: 'addParameter' + index: 0 + name: 'foregroundColor' + style: optional_named + argumentValue: + expression: '{% onPrimary %}' + requiredIf: "onPrimary != ''" + - kind: 'removeParameter' + name: 'onPrimary' + variables: + onPrimary: + kind: 'fragment' + value: 'arguments[onPrimary]' + + # Changes made in https://github.com/flutter/flutter/pull/105291 + - title: "Migrate 'ElevatedButton.styleFrom(onSurface)' to 'ElevatedButton.styleFrom(disabledForegroundColor)'" + date: 2022-05-27 + element: + uris: [ 'material.dart' ] + method: 'styleFrom' + inClass: 'ElevatedButton' + changes: + - kind: 'addParameter' + index: 2 + name: 'disabledForegroundColor' + style: optional_named + argumentValue: + expression: '{% onSurface %}.withOpacity(0.38)' + requiredIf: "onSurface != ''" + - kind: 'addParameter' + index: 3 + name: 'disabledBackgroundColor' + style: optional_named + argumentValue: + expression: '{% onSurface %}.withOpacity(0.12)' + requiredIf: "onSurface != ''" + - kind: 'removeParameter' + name: 'onSurface' + variables: + onSurface: + kind: 'fragment' + value: 'arguments[onSurface]' + + # Changes made in https://github.com/flutter/flutter/pull/105291 + - title: "Migrate 'OutlinedButton.styleFrom(primary)' to 'OutlinedButton.styleFrom(foregroundColor)'" + date: 2022-05-27 + element: + uris: [ 'material.dart' ] + method: 'styleFrom' + inClass: 'OutlinedButton' + changes: + - kind: 'addParameter' + index: 0 + name: 'foregroundColor' + style: optional_named + argumentValue: + expression: '{% primary %}' + requiredIf: "primary != ''" + - kind: 'removeParameter' + name: 'primary' + variables: + primary: + kind: 'fragment' + value: 'arguments[primary]' + + # Changes made in https://github.com/flutter/flutter/pull/105291 + - title: "Migrate 'OutlinedButton.styleFrom(onSurface)' to 'OutlinedButton.styleFrom(disabledForeground)'" + date: 2022-05-27 + element: + uris: [ 'material.dart' ] + method: 'styleFrom' + inClass: 'OutlinedButton' + changes: + - kind: 'addParameter' + index: 2 + name: 'disabledForegroundColor' + style: optional_named + argumentValue: + expression: '{% onSurface %}.withOpacity(0.38)' + requiredIf: "onSurface != ''" + - kind: 'removeParameter' + name: 'onSurface' + variables: + onSurface: + kind: 'fragment' + value: 'arguments[onSurface]' + + # Changes made in https://github.com/flutter/flutter/pull/105291 + - title: "Migrate 'TextButton.styleFrom(primary)' to 'TextButton.styleFrom(foregroundColor)'" + date: 2022-05-27 + element: + uris: [ 'material.dart' ] + method: 'styleFrom' + inClass: 'TextButton' + changes: + - kind: 'addParameter' + index: 0 + name: 'foregroundColor' + style: optional_named + argumentValue: + expression: '{% primary %}' + requiredIf: "primary != ''" + - kind: 'removeParameter' + name: 'primary' + variables: + primary: + kind: 'fragment' + value: 'arguments[primary]' + + # Changes made in https://github.com/flutter/flutter/pull/105291 + - title: "Migrate 'TextButton.styleFrom(onSurface)' to 'TextButton.styleFrom(disabledForeground)'" + date: 2022-05-27 + element: + uris: [ 'material.dart' ] + method: 'styleFrom' + inClass: 'TextButton' + changes: + - kind: 'addParameter' + index: 2 + name: 'disabledForegroundColor' + style: optional_named + argumentValue: + expression: '{% onSurface %}.withOpacity(0.38)' + requiredIf: "onSurface != ''" + - kind: 'removeParameter' + name: 'onSurface' + variables: + onSurface: + kind: 'fragment' + value: 'arguments[onSurface]' + + # Changes made in https://github.com/flutter/flutter/pull/78588 + - title: "Migrate to 'buildOverscrollIndicator'" + date: 2021-03-18 + element: + uris: [ 'material.dart' ] + method: 'buildViewportChrome' + inClass: 'MaterialScrollBehavior' + changes: + - kind: 'rename' + newName: 'buildOverscrollIndicator' + + # Changes made in https://github.com/flutter/flutter/pull/111706 + - title: "Migrate to 'trackVisibility'" + date: 2022-09-15 + element: + uris: [ 'material.dart' ] + field: 'showTrackOnHover' + inClass: 'Scrollbar' + changes: + - kind: 'rename' + newName: 'trackVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/111706 + - title: "Migrate to 'trackVisibility'" + date: 2022-09-15 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'Scrollbar' + changes: + - kind: 'renameParameter' + oldName: 'showTrackOnHover' + newName: 'trackVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/111706 + - title: "Migrate to 'trackVisibility'" + date: 2022-09-15 + element: + uris: [ 'material.dart' ] + field: 'showTrackOnHover' + inClass: 'ScrollbarThemeData' + changes: + - kind: 'rename' + newName: 'trackVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/111706 + - title: "Migrate to 'thumbVisibility'" + date: 2022-09-15 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ScrollbarThemeData' + changes: + - kind: 'renameParameter' + oldName: 'showTrackOnHover' + newName: 'trackVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/111706 + - title: "Migrate to 'trackVisibility'" + date: 2022-09-15 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ScrollbarThemeData' + changes: + - kind: 'renameParameter' + oldName: 'showTrackOnHover' + newName: 'trackVisibility' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_material/fix_sliver_app_bar.yaml b/packages/flutter/lib/fix_data/fix_material/fix_sliver_app_bar.yaml new file mode 100644 index 000000000000..8aa23f6b14f0 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_material/fix_sliver_app_bar.yaml @@ -0,0 +1,150 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are for SliverAppBar from the Material library. * +# For fixes to +# * AppBar: fix_app_bar.yaml +# * AppBarTheme: fix_app_bar_theme.yaml +# * ColorScheme: fix_color_scheme.yaml +# * Material (general): fix_material.yaml +# * TextTheme: fix_text_theme.yaml +# * ThemeData: fix_theme_data.yaml +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'systemOverlayStyle'" + date: 2020-07-12 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'SliverAppBar' + oneOf: + - if: "brightness == 'Brightness.dark'" + changes: + - kind: 'addParameter' + index: 34 + name: 'systemOverlayStyle' + style: optional_named + argumentValue: + expression: '{% SystemUiOverlayStyle %}.light' + requiredIf: "brightness == 'Brightness.dark'" + variables: + SystemUiOverlayStyle: + kind: 'import' + uris: [ 'services.dart' ] + name: 'SystemUiOverlayStyle' + - kind: 'removeParameter' + name: 'brightness' + - if: "brightness == 'Brightness.light'" + changes: + - kind: 'addParameter' + index: 34 + name: 'systemOverlayStyle' + style: optional_named + argumentValue: + expression: '{% SystemUiOverlayStyle %}.dark' + requiredIf: "brightness == 'Brightness.light'" + variables: + SystemUiOverlayStyle: + kind: 'import' + uris: [ 'services.dart' ] + name: 'SystemUiOverlayStyle' + - kind: 'removeParameter' + name: 'brightness' + variables: + brightness: + kind: 'fragment' + value: 'arguments[brightness]' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'systemOverlayStyle'" + date: 2021-07-12 + element: + uris: [ 'material.dart' ] + field: 'brightness' + inClass: 'SliverAppBar' + changes: + - kind: 'rename' + newName: 'systemOverlayStyle' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'toolbarTextStyle' & 'titleTextStyle'" + date: 2020-07-12 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'SliverAppBar' + changes: + - kind: 'addParameter' + index: 32 + name: 'toolbarTextStyle' + style: optional_named + argumentValue: + expression: '{% textTheme %}.bodyText2' + requiredIf: "textTheme != ''" + - kind: 'addParameter' + index: 33 + name: 'titleTextStyle' + style: optional_named + argumentValue: + expression: '{% textTheme %}.headline6' + requiredIf: "textTheme != ''" + - kind: 'removeParameter' + name: 'textTheme' + variables: + textTheme: + kind: 'fragment' + value: 'arguments[textTheme]' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'toolbarTextStyle'" + date: 2021-07-12 + # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 + bulkApply: false + element: + uris: [ 'material.dart' ] + field: 'textTheme' + inClass: 'SliverAppBar' + changes: + - kind: 'rename' + newName: 'toolbarTextStyle' + + # Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Migrate to 'titleTextStyle'" + date: 2021-07-12 + # TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639 + bulkApply: false + element: + uris: [ 'material.dart' ] + field: 'textTheme' + inClass: 'SliverAppBar' + changes: + - kind: 'rename' + newName: 'titleTextStyle' + +# Changes made in https://github.com/flutter/flutter/pull/86198 + - title: "Remove 'backwardsCompatibility'" + date: 2020-07-12 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'SliverAppBar' + changes: + - kind: 'removeParameter' + name: 'backwardsCompatibility' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_material/fix_text_theme.yaml b/packages/flutter/lib/fix_data/fix_material/fix_text_theme.yaml new file mode 100644 index 000000000000..c691938d3af4 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_material/fix_text_theme.yaml @@ -0,0 +1,455 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are for the TextTheme class from the Material library. * +# For fixes to +# * AppBar: fix_app_bar.yaml +# * AppBarTheme: fix_app_bar_theme.yaml +# * ColorScheme: fix_color_scheme.yaml +# * Material (general): fix_material.yaml +# * SliverAppBar: fix_sliver_app_bar.yaml +# * ThemeData: fix_theme_data.yaml +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'headline1'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: display4 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'headline1' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'headline2'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: display3 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'headline2' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'headline3'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: display2 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'headline3' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'headline4'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: display1 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'headline4' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'headline5'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: headline + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'headline5' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'headline6'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: title + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'headline6' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'subtitle1'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: subhead + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'subtitle1' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'bodyText1'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: body2 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'bodyText1' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'bodyText2'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: body1 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'bodyText2' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: "Rename to 'subtitle2'" + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + getter: subtitle + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'subtitle2' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: 'Rename arguments' + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'TextTheme' + changes: + - kind: 'renameParameter' + oldName: 'display4' + newName: 'headline1' + - kind: 'renameParameter' + oldName: 'display3' + newName: 'headline2' + - kind: 'renameParameter' + oldName: 'display2' + newName: 'headline3' + - kind: 'renameParameter' + oldName: 'display1' + newName: 'headline4' + - kind: 'renameParameter' + oldName: 'headline' + newName: 'headline5' + - kind: 'renameParameter' + oldName: 'title' + newName: 'headline6' + - kind: 'renameParameter' + oldName: 'subhead' + newName: 'subtitle1' + - kind: 'renameParameter' + oldName: 'subtitle' + newName: 'subtitle2' + - kind: 'renameParameter' + oldName: 'body2' + newName: 'bodyText1' + - kind: 'renameParameter' + oldName: 'body1' + newName: 'bodyText2' + + # Changes made in https://github.com/flutter/flutter/pull/48547 + - title: 'Rename arguments' + date: 2020-01-24 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'TextTheme' + changes: + - kind: 'renameParameter' + oldName: 'display4' + newName: 'headline1' + - kind: 'renameParameter' + oldName: 'display3' + newName: 'headline2' + - kind: 'renameParameter' + oldName: 'display2' + newName: 'headline3' + - kind: 'renameParameter' + oldName: 'display1' + newName: 'headline4' + - kind: 'renameParameter' + oldName: 'headline' + newName: 'headline5' + - kind: 'renameParameter' + oldName: 'title' + newName: 'headline6' + - kind: 'renameParameter' + oldName: 'subhead' + newName: 'subtitle1' + - kind: 'renameParameter' + oldName: 'subtitle' + newName: 'subtitle2' + - kind: 'renameParameter' + oldName: 'body2' + newName: 'bodyText1' + - kind: 'renameParameter' + oldName: 'body1' + newName: 'bodyText2' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'displayLarge'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: headline1 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'displayLarge' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'displayMedium'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: headline2 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'displayMedium' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'displaySmall'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: headline3 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'displaySmall' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'headlineMedium'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: headline4 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'headlineMedium' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'headlineSmall'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: headline5 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'headlineSmall' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'titleLarge'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: headline6 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'titleLarge' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'titleMedium'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: subtitle1 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'titleMedium' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'titleSmall'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: subtitle2 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'titleSmall' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'bodyLarge'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: bodyText1 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'bodyLarge' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'bodyMedium'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: bodyText2 + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'bodyMedium' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'bodySmall'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: caption + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'bodySmall' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'labelLarge'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: button + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'labelLarge' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: "Rename to 'labelSmall'" + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + getter: overline + inClass: 'TextTheme' + changes: + - kind: 'rename' + newName: 'labelSmall' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: 'Rename arguments' + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'TextTheme' + changes: + - kind: 'renameParameter' + oldName: 'headline1' + newName: 'displayLarge' + - kind: 'renameParameter' + oldName: 'headline2' + newName: 'displayMedium' + - kind: 'renameParameter' + oldName: 'headline3' + newName: 'displaySmall' + - kind: 'renameParameter' + oldName: 'headline4' + newName: 'headlineMedium' + - kind: 'renameParameter' + oldName: 'headline5' + newName: 'headlineSmall' + - kind: 'renameParameter' + oldName: 'headline6' + newName: 'titleLarge' + - kind: 'renameParameter' + oldName: 'subtitle1' + newName: 'titleMedium' + - kind: 'renameParameter' + oldName: 'subtitle2' + newName: 'titleSmall' + - kind: 'renameParameter' + oldName: 'bodyText1' + newName: 'bodyLarge' + - kind: 'renameParameter' + oldName: 'bodyText2' + newName: 'bodyMedium' + - kind: 'renameParameter' + oldName: 'caption' + newName: 'bodySmall' + - kind: 'renameParameter' + oldName: 'button' + newName: 'labelLarge' + - kind: 'renameParameter' + oldName: 'overline' + newName: 'labelSmall' + + # Changes made in https://github.com/flutter/flutter/pull/109817 + - title: 'Rename arguments' + date: 2022-08-18 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'TextTheme' + changes: + - kind: 'renameParameter' + oldName: 'headline1' + newName: 'displayLarge' + - kind: 'renameParameter' + oldName: 'headline2' + newName: 'displayMedium' + - kind: 'renameParameter' + oldName: 'headline3' + newName: 'displaySmall' + - kind: 'renameParameter' + oldName: 'headline4' + newName: 'headlineMedium' + - kind: 'renameParameter' + oldName: 'headline5' + newName: 'headlineSmall' + - kind: 'renameParameter' + oldName: 'headline6' + newName: 'titleLarge' + - kind: 'renameParameter' + oldName: 'subtitle1' + newName: 'titleMedium' + - kind: 'renameParameter' + oldName: 'subtitle2' + newName: 'titleSmall' + - kind: 'renameParameter' + oldName: 'bodyText1' + newName: 'bodyLarge' + - kind: 'renameParameter' + oldName: 'bodyText2' + newName: 'bodyMedium' + - kind: 'renameParameter' + oldName: 'caption' + newName: 'bodySmall' + - kind: 'renameParameter' + oldName: 'button' + newName: 'labelLarge' + - kind: 'renameParameter' + oldName: 'overline' + newName: 'labelSmall' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_material/fix_theme_data.yaml b/packages/flutter/lib/fix_data/fix_material/fix_theme_data.yaml new file mode 100644 index 000000000000..2b9889034033 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_material/fix_theme_data.yaml @@ -0,0 +1,1690 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + + +# * Fixes in this file are for the ThemeData class from the Material library. * +# For fixes to +# * AppBar: fix_app_bar.yaml +# * AppBarTheme: fix_app_bar_theme.yaml +# * ColorScheme: fix_color_scheme.yaml +# * Material (general): fix_material.yaml +# * SliverAppBar: fix_sliver_app_bar.yaml +# * TextTheme: fix_text_theme.yaml +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/87281 + - title: "Remove 'fixTextFieldOutlineLabel'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'fixTextFieldOutlineLabel' + + # Changes made in https://github.com/flutter/flutter/pull/87281 + - title: "Remove 'fixTextFieldOutlineLabel'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'fixTextFieldOutlineLabel' + + # Changes made in https://github.com/flutter/flutter/pull/87281 + - title: "Remove 'fixTextFieldOutlineLabel'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'fixTextFieldOutlineLabel' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'buttonColor'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'buttonColor' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'buttonColor'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'buttonColor' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'buttonColor'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'buttonColor' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'accentIconTheme'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'accentIconTheme' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'accentIconTheme'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'accentIconTheme' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'accentIconTheme'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'accentIconTheme' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'accentTextTheme'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'accentTextTheme' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'accentTextTheme'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'accentTextTheme' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'accentTextTheme'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'accentTextTheme' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'accentColorBrightness'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'accentColorBrightness' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'accentColorBrightness'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'accentColorBrightness' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Remove 'accentColorBrightness'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'accentColorBrightness' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Migrate to 'ColorScheme.secondary'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + field: 'accentColor' + inClass: 'ThemeData' + changes: + - kind: 'rename' + newName: 'colorScheme.secondary' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Migrate to 'ColorScheme.secondary'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + oneOf: + - if: "accentColor != '' && primarySwatch == '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''" + - kind: 'removeParameter' + name: 'accentColor' + - if: "accentColor != '' && primarySwatch != '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'accentColor' + - kind: 'removeParameter' + name: 'primarySwatch' + - if: "accentColor != '' && primarySwatch == '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'accentColor' + - if: "accentColor != '' && primarySwatch != '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'accentColor' + - kind: 'removeParameter' + name: 'primarySwatch' + variables: + accentColor: + kind: 'fragment' + value: 'arguments[accentColor]' + primarySwatch: + kind: 'fragment' + value: 'arguments[primarySwatch]' + colorScheme: + kind: 'fragment' + value: 'arguments[colorScheme]' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Migrate to 'ColorScheme.secondary'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + oneOf: + - if: "accentColor != '' && primarySwatch == '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''" + - kind: 'removeParameter' + name: 'accentColor' + - if: "accentColor != '' && primarySwatch != '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'accentColor' + - kind: 'removeParameter' + name: 'primarySwatch' + - if: "accentColor != '' && primarySwatch == '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'accentColor' + - if: "accentColor != '' && primarySwatch != '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'accentColor' + - kind: 'removeParameter' + name: 'primarySwatch' + variables: + accentColor: + kind: 'fragment' + value: 'arguments[accentColor]' + primarySwatch: + kind: 'fragment' + value: 'arguments[primarySwatch]' + colorScheme: + kind: 'fragment' + value: 'arguments[colorScheme]' + + # Changes made in https://github.com/flutter/flutter/pull/81336 + - title: "Migrate to 'ColorScheme.secondary'" + date: 2021-04-30 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + oneOf: + - if: "accentColor != '' && primarySwatch == '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch().copyWith(secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme ==''" + - kind: 'removeParameter' + name: 'accentColor' + - if: "accentColor != '' && primarySwatch != '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'accentColor' + - kind: 'removeParameter' + name: 'primarySwatch' + - if: "accentColor != '' && primarySwatch == '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch == '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'accentColor' + - if: "accentColor != '' && primarySwatch != '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, secondary: {% accentColor %})' + requiredIf: "accentColor != '' && primarySwatch != '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'accentColor' + - kind: 'removeParameter' + name: 'primarySwatch' + variables: + accentColor: + kind: 'fragment' + value: 'arguments[accentColor]' + primarySwatch: + kind: 'fragment' + value: 'arguments[primarySwatch]' + colorScheme: + kind: 'fragment' + value: 'arguments[colorScheme]' + + # Changes made in https://github.com/flutter/flutter/pull/93396 + - title: "Remove 'primaryColorBrightness'" + date: 2021-11-11 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'primaryColorBrightness' + + # Changes made in https://github.com/flutter/flutter/pull/93396 + - title: "Remove 'primaryColorBrightness'" + date: 2021-11-11 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'primaryColorBrightness' + + # Changes made in https://github.com/flutter/flutter/pull/93396 + - title: "Remove 'primaryColorBrightness'" + date: 2021-11-11 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'primaryColorBrightness' + + # Changes made in https://github.com/flutter/flutter/pull/66482 + - title: "Migrate to 'TextSelectionThemeData'" + date: 2020-09-24 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + oneOf: + - if: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor != ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionColor: {% textSelectionColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' + requiredIf: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor != ''" + - kind: 'removeParameter' + name: 'textSelectionColor' + - kind: 'removeParameter' + name: 'cursorColor' + - kind: 'removeParameter' + name: 'textSelectionHandleColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor != ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' + requiredIf: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor != ''" + - kind: 'removeParameter' + name: 'cursorColor' + - kind: 'removeParameter' + name: 'textSelectionHandleColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor == ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionColor: {% textSelectionColor %},)' + requiredIf: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor == ''" + - kind: 'removeParameter' + name: 'textSelectionColor' + - kind: 'removeParameter' + name: 'cursorColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor != ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(selectionColor: {% textSelectionColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' + requiredIf: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor != ''" + - kind: 'removeParameter' + name: 'textSelectionColor' + - kind: 'removeParameter' + name: 'textSelectionHandleColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor == ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %})' + requiredIf: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor == ''" + - kind: 'removeParameter' + name: 'cursorColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor == ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(selectionColor: {% textSelectionColor %})' + requiredIf: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor == ''" + - kind: 'removeParameter' + name: 'textSelectionColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor == '' && cursorColor == '' && textSelectionHandleColor != ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(selectionHandleColor: {% textSelectionHandleColor %})' + requiredIf: "textSelectionColor == '' && cursorColor == '' && textSelectionHandleColor != ''" + - kind: 'removeParameter' + name: 'textSelectionHandleColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "useTextSelectionTheme != ''" + changes: + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + variables: + textSelectionColor: + kind: 'fragment' + value: 'arguments[textSelectionColor]' + cursorColor: + kind: 'fragment' + value: 'arguments[cursorColor]' + textSelectionHandleColor: + kind: 'fragment' + value: 'arguments[textSelectionHandleColor]' + useTextSelectionTheme: + kind: 'fragment' + value: 'arguments[useTextSelectionTheme]' + + # Changes made in https://github.com/flutter/flutter/pull/66482 + - title: "Migrate to 'TextSelectionThemeData'" + date: 2020-09-24 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + oneOf: + - if: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor != ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionColor: {% textSelectionColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' + requiredIf: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor != ''" + - kind: 'removeParameter' + name: 'textSelectionColor' + - kind: 'removeParameter' + name: 'cursorColor' + - kind: 'removeParameter' + name: 'textSelectionHandleColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor != ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' + requiredIf: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor != ''" + - kind: 'removeParameter' + name: 'cursorColor' + - kind: 'removeParameter' + name: 'textSelectionHandleColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor == ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %}, selectionColor: {% textSelectionColor %},)' + requiredIf: "textSelectionColor != '' && cursorColor != '' && textSelectionHandleColor == ''" + - kind: 'removeParameter' + name: 'textSelectionColor' + - kind: 'removeParameter' + name: 'cursorColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor != ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(selectionColor: {% textSelectionColor %}, selectionHandleColor: {% textSelectionHandleColor %},)' + requiredIf: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor != ''" + - kind: 'removeParameter' + name: 'textSelectionColor' + - kind: 'removeParameter' + name: 'textSelectionHandleColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor == ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(cursorColor: {% cursorColor %})' + requiredIf: "textSelectionColor == '' && cursorColor != '' && textSelectionHandleColor == ''" + - kind: 'removeParameter' + name: 'cursorColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor == ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(selectionColor: {% textSelectionColor %})' + requiredIf: "textSelectionColor != '' && cursorColor == '' && textSelectionHandleColor == ''" + - kind: 'removeParameter' + name: 'textSelectionColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "textSelectionColor == '' && cursorColor == '' && textSelectionHandleColor != ''" + changes: + - kind: 'addParameter' + index: 73 + name: 'textSelectionTheme' + style: optional_named + argumentValue: + expression: 'TextSelectionThemeData(selectionHandleColor: {% textSelectionHandleColor %})' + requiredIf: "textSelectionColor == '' && cursorColor == '' && textSelectionHandleColor != ''" + - kind: 'removeParameter' + name: 'textSelectionHandleColor' + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + - if: "useTextSelectionTheme != ''" + changes: + - kind: 'removeParameter' + name: 'useTextSelectionTheme' + variables: + textSelectionColor: + kind: 'fragment' + value: 'arguments[textSelectionColor]' + cursorColor: + kind: 'fragment' + value: 'arguments[cursorColor]' + textSelectionHandleColor: + kind: 'fragment' + value: 'arguments[textSelectionHandleColor]' + useTextSelectionTheme: + kind: 'fragment' + value: 'arguments[useTextSelectionTheme]' + + # Changes made in https://github.com/flutter/flutter/pull/109070 + - title: "Remove 'selectedRowColor'" + date: 2022-08-05 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'selectedRowColor' + + # Changes made in https://github.com/flutter/flutter/pull/109070 + - title: "Remove 'selectedRowColor'" + date: 2022-08-05 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'selectedRowColor' + + # Changes made in https://github.com/flutter/flutter/pull/109070 + - title: "Remove 'selectedRowColor'" + date: 2022-08-05 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'selectedRowColor' + + # Changes made in https://github.com/flutter/flutter/pull/97972/ + - title: "Migrate 'ThemeData.toggleableActiveColor' to individual themes" + date: 2022-05-18 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'toggleableActiveColor' + - kind: 'addParameter' + index: 96 + name: 'checkboxTheme' + style: optional_named + argumentValue: + expression: "CheckboxThemeData(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && checkboxTheme == ''" + - kind: 'addParameter' + index: 97 + name: 'checkboxTheme' + style: optional_named + argumentValue: + expression: "{% checkboxTheme %}.copyWith(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && checkboxTheme != ''" + - kind: 'addParameter' + index: 98 + name: 'radioTheme' + style: optional_named + argumentValue: + expression: "RadioThemeData(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && radioTheme == ''" + - kind: 'addParameter' + index: 99 + name: 'radioTheme' + style: optional_named + argumentValue: + expression: "{% radioTheme %}.copyWith(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && radioTheme != ''" + - kind: 'addParameter' + index: 100 + name: 'switchTheme' + style: optional_named + argumentValue: + expression: "SwitchThemeData(\n + thumbColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + trackColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && switchTheme == ''" + - kind: 'addParameter' + index: 101 + name: 'switchTheme' + style: optional_named + argumentValue: + expression: "{% switchTheme %}.copyWith(\n + thumbColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + trackColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && switchTheme != ''" + variables: + checkboxTheme: + kind: 'fragment' + value: 'arguments[checkboxTheme]' + radioTheme: + kind: 'fragment' + value: 'arguments[radioTheme]' + switchTheme: + kind: 'fragment' + value: 'arguments[switchTheme]' + toggleableActiveColor: + kind: 'fragment' + value: 'arguments[toggleableActiveColor]' + + # Changes made in https://github.com/flutter/flutter/pull/97972/ + - title: "Migrate 'ThemeData.raw.toggleableActiveColor' to individual themes" + date: 2022-05-18 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'toggleableActiveColor' + - kind: 'addParameter' + index: 96 + name: 'checkboxTheme' + style: optional_named + argumentValue: + expression: "CheckboxThemeData(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && checkboxTheme == ''" + - kind: 'addParameter' + index: 97 + name: 'checkboxTheme' + style: optional_named + argumentValue: + expression: "{% checkboxTheme %}.copyWith(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && checkboxTheme != ''" + - kind: 'addParameter' + index: 98 + name: 'radioTheme' + style: optional_named + argumentValue: + expression: "RadioThemeData(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && radioTheme == ''" + - kind: 'addParameter' + index: 99 + name: 'radioTheme' + style: optional_named + argumentValue: + expression: "{% radioTheme %}.copyWith(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && radioTheme != ''" + - kind: 'addParameter' + index: 100 + name: 'switchTheme' + style: optional_named + argumentValue: + expression: "SwitchThemeData(\n + thumbColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + trackColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && switchTheme == ''" + - kind: 'addParameter' + index: 101 + name: 'switchTheme' + style: optional_named + argumentValue: + expression: "{% switchTheme %}.copyWith(\n + thumbColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + trackColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && switchTheme != ''" + variables: + checkboxTheme: + kind: 'fragment' + value: 'arguments[checkboxTheme]' + radioTheme: + kind: 'fragment' + value: 'arguments[radioTheme]' + switchTheme: + kind: 'fragment' + value: 'arguments[switchTheme]' + toggleableActiveColor: + kind: 'fragment' + value: 'arguments[toggleableActiveColor]' + + # Changes made in https://github.com/flutter/flutter/pull/97972/ + - title: "Migrate 'ThemeData.copyWith.toggleableActiveColor' to individual themes" + date: 2022-05-18 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + changes: + - kind: 'removeParameter' + name: 'toggleableActiveColor' + - kind: 'addParameter' + index: 96 + name: 'checkboxTheme' + style: optional_named + argumentValue: + expression: "CheckboxThemeData(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && checkboxTheme == ''" + - kind: 'addParameter' + index: 97 + name: 'checkboxTheme' + style: optional_named + argumentValue: + expression: "{% checkboxTheme %}.copyWith(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && checkboxTheme != ''" + - kind: 'addParameter' + index: 98 + name: 'radioTheme' + style: optional_named + argumentValue: + expression: "RadioThemeData(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && radioTheme == ''" + - kind: 'addParameter' + index: 99 + name: 'radioTheme' + style: optional_named + argumentValue: + expression: "{% radioTheme %}.copyWith(\n + fillColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && radioTheme != ''" + - kind: 'addParameter' + index: 100 + name: 'switchTheme' + style: optional_named + argumentValue: + expression: "SwitchThemeData(\n + thumbColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + trackColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && switchTheme == ''" + - kind: 'addParameter' + index: 101 + name: 'switchTheme' + style: optional_named + argumentValue: + expression: "{% switchTheme %}.copyWith(\n + thumbColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + trackColor: MaterialStateProperty.resolveWith((Set states) {\n + if (states.contains(MaterialState.disabled)) { + return null; + }\n + if (states.contains(MaterialState.selected)) { + return {% toggleableActiveColor %}; + }\n + return null;\n + }),\n + )" + requiredIf: "toggleableActiveColor != '' && switchTheme != ''" + variables: + checkboxTheme: + kind: 'fragment' + value: 'arguments[checkboxTheme]' + radioTheme: + kind: 'fragment' + value: 'arguments[radioTheme]' + switchTheme: + kind: 'fragment' + value: 'arguments[switchTheme]' + toggleableActiveColor: + kind: 'fragment' + value: 'arguments[toggleableActiveColor]' + + # Changes made in https://github.com/flutter/flutter/pull/111080 + - title: "Migrate to 'BottomAppBarTheme.color'" + date: 2022-09-07 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + oneOf: + - if: "bottomAppBarColor != ''" + changes: + - kind: 'removeParameter' + name: 'bottomAppBarColor' + - kind: 'addParameter' + index: 73 + name: 'bottomAppBarTheme' + style: optional_named + argumentValue: + expression: 'BottomAppBarTheme(color: {% bottomAppBarColor %})' + requiredIf: "bottomAppBarColor != ''" + variables: + bottomAppBarColor: + kind: 'fragment' + value: 'arguments[bottomAppBarColor]' + + # Changes made in https://github.com/flutter/flutter/pull/111080 + - title: "Migrate to 'BottomAppBarTheme.color'" + date: 2022-09-07 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + oneOf: + - if: "bottomAppBarColor != ''" + changes: + - kind: 'removeParameter' + name: 'bottomAppBarColor' + - kind: 'addParameter' + index: 73 + name: 'bottomAppBarTheme' + style: optional_named + argumentValue: + expression: 'BottomAppBarTheme(color: {% bottomAppBarColor %})' + requiredIf: "bottomAppBarColor != ''" + variables: + bottomAppBarColor: + kind: 'fragment' + value: 'arguments[bottomAppBarColor]' + + # Changes made in https://github.com/flutter/flutter/pull/111080 + - title: "Migrate to 'BottomAppBarTheme.color'" + date: 2022-09-06 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + oneOf: + - if: "bottomAppBarColor != ''" + changes: + - kind: 'removeParameter' + name: 'bottomAppBarColor' + - kind: 'addParameter' + index: 73 + name: 'bottomAppBarTheme' + style: optional_named + argumentValue: + expression: 'BottomAppBarTheme(color: {% bottomAppBarColor %})' + requiredIf: "bottomAppBarColor != ''" + variables: + bottomAppBarColor: + kind: 'fragment' + value: 'arguments[bottomAppBarColor]' + + # Changes made in https://github.com/flutter/flutter/pull/110162 + - title: "Migrate to 'ColorScheme.background'" + date: 2022-08-24 + element: + uris: [ 'material.dart' ] + field: 'backgroundColor' + inClass: 'ThemeData' + changes: + - kind: 'rename' + newName: 'colorScheme.background' + + # Changes made in https://github.com/flutter/flutter/pull/110162 + - title: "Migrate to 'ColorScheme.background'" + date: 2022-08-24 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + oneOf: + - if: "backgroundColor != '' && primarySwatch == '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme(background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme ==''" + - kind: 'removeParameter' + name: 'backgroundColor' + - if: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - kind: 'removeParameter' + name: 'primarySwatch' + - if: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - if: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - kind: 'removeParameter' + name: 'primarySwatch' + variables: + backgroundColor: + kind: 'fragment' + value: 'arguments[backgroundColor]' + primarySwatch: + kind: 'fragment' + value: 'arguments[primarySwatch]' + colorScheme: + kind: 'fragment' + value: 'arguments[colorScheme]' + + # Changes made in https://github.com/flutter/flutter/pull/110162 + - title: "Migrate to 'ColorScheme.background'" + date: 2022-08-24 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + oneOf: + - if: "backgroundColor != '' && primarySwatch == '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme(background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme ==''" + - kind: 'removeParameter' + name: 'backgroundColor' + - if: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - kind: 'removeParameter' + name: 'primarySwatch' + - if: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - if: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - kind: 'removeParameter' + name: 'primarySwatch' + variables: + backgroundColor: + kind: 'fragment' + value: 'arguments[backgroundColor]' + primarySwatch: + kind: 'fragment' + value: 'arguments[primarySwatch]' + colorScheme: + kind: 'fragment' + value: 'arguments[colorScheme]' + + # Changes made in https://github.com/flutter/flutter/pull/110162 + - title: "Migrate to 'ColorScheme.background'" + date: 2022-08-24 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + oneOf: + - if: "backgroundColor != '' && primarySwatch == '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme(background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - if: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - kind: 'removeParameter' + name: 'primarySwatch' + - if: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch == '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - if: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, background: {% backgroundColor %})' + requiredIf: "backgroundColor != '' && primarySwatch != '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'backgroundColor' + - kind: 'removeParameter' + name: 'primarySwatch' + variables: + backgroundColor: + kind: 'fragment' + value: 'arguments[backgroundColor]' + primarySwatch: + kind: 'fragment' + value: 'arguments[primarySwatch]' + colorScheme: + kind: 'fragment' + value: 'arguments[colorScheme]' + + # Changes made in https://github.com/flutter/flutter/pull/110162 + - title: "Migrate to 'ColorScheme.error'" + date: 2022-08-24 + element: + uris: [ 'material.dart' ] + field: 'errorColor' + inClass: 'ThemeData' + changes: + - kind: 'rename' + newName: 'colorScheme.error' + + # Changes made in https://github.com/flutter/flutter/pull/110162 + - title: "Migrate to 'ColorScheme.error'" + date: 2022-08-24 + element: + uris: [ 'material.dart' ] + method: 'copyWith' + inClass: 'ThemeData' + oneOf: + - if: "errorColor != '' && primarySwatch == '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme(error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme ==''" + - kind: 'removeParameter' + name: 'errorColor' + - if: "errorColor != '' && primarySwatch != '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'errorColor' + - kind: 'removeParameter' + name: 'primarySwatch' + - if: "errorColor != '' && primarySwatch == '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'errorColor' + - if: "errorColor != '' && primarySwatch != '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'errorColor' + - kind: 'removeParameter' + name: 'primarySwatch' + variables: + errorColor: + kind: 'fragment' + value: 'arguments[errorColor]' + primarySwatch: + kind: 'fragment' + value: 'arguments[primarySwatch]' + colorScheme: + kind: 'fragment' + value: 'arguments[colorScheme]' + + # Changes made in https://github.com/flutter/flutter/pull/110162 + - title: "Migrate to 'ColorScheme.error'" + date: 2022-08-24 + element: + uris: [ 'material.dart' ] + constructor: 'raw' + inClass: 'ThemeData' + oneOf: + - if: "errorColor != '' && primarySwatch == '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme(error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme ==''" + - kind: 'removeParameter' + name: 'errorColor' + - if: "errorColor != '' && primarySwatch != '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'errorColor' + - kind: 'removeParameter' + name: 'primarySwatch' + - if: "errorColor != '' && primarySwatch == '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'errorColor' + - if: "errorColor != '' && primarySwatch != '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'errorColor' + - kind: 'removeParameter' + name: 'primarySwatch' + variables: + errorColor: + kind: 'fragment' + value: 'arguments[errorColor]' + primarySwatch: + kind: 'fragment' + value: 'arguments[primarySwatch]' + colorScheme: + kind: 'fragment' + value: 'arguments[colorScheme]' + + # Changes made in https://github.com/flutter/flutter/pull/110162 + - title: "Migrate to 'ColorScheme.error'" + date: 2022-08-24 + element: + uris: [ 'material.dart' ] + constructor: '' + inClass: 'ThemeData' + oneOf: + - if: "errorColor != '' && primarySwatch == '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme(error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme ==''" + - kind: 'removeParameter' + name: 'errorColor' + - if: "errorColor != '' && primarySwatch != '' && colorScheme == ''" + changes: + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: 'ColorScheme.fromSwatch(primarySwatch: {% primarySwatch %}).copyWith(error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme == ''" + - kind: 'removeParameter' + name: 'errorColor' + - kind: 'removeParameter' + name: 'primarySwatch' + - if: "errorColor != '' && primarySwatch == '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch == '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'errorColor' + - if: "errorColor != '' && primarySwatch != '' && colorScheme != ''" + changes: + - kind: 'removeParameter' + name: 'colorScheme' # Remove to add back with modification + - kind: 'addParameter' + index: 56 + name: 'colorScheme' + style: optional_named + argumentValue: + expression: '{% colorScheme %}.copyWith(primarySwatch: {% primarySwatch %}, error: {% errorColor %})' + requiredIf: "errorColor != '' && primarySwatch != '' && colorScheme != ''" + - kind: 'removeParameter' + name: 'errorColor' + - kind: 'removeParameter' + name: 'primarySwatch' + variables: + errorColor: + kind: 'fragment' + value: 'arguments[errorColor]' + primarySwatch: + kind: 'fragment' + value: 'arguments[primarySwatch]' + colorScheme: + kind: 'fragment' + value: 'arguments[colorScheme]' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_rendering.yaml b/packages/flutter/lib/fix_data/fix_rendering.yaml new file mode 100644 index 000000000000..efc56a8bc427 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_rendering.yaml @@ -0,0 +1,113 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are from the Rendering library. * +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/66305 + - title: "Migrate to 'clipBehavior'" + date: 2020-09-22 + element: + uris: [ 'rendering.dart' ] + field: 'overflow' + inClass: 'RenderStack' + changes: + - kind: 'rename' + newName: 'clipBehavior' + + # Changes made in https://github.com/flutter/flutter/pull/66305 + - title: "Migrate to 'clipBehavior'" + date: 2020-09-22 + element: + uris: [ 'rendering.dart' ] + constructor: '' + inClass: 'RenderStack' + oneOf: + - if: "overflow == 'Overflow.clip'" + changes: + - kind: 'addParameter' + index: 0 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.hardEdge' + requiredIf: "overflow == 'Overflow.clip'" + - kind: 'removeParameter' + name: 'overflow' + - if: "overflow == 'Overflow.visible'" + changes: + - kind: 'addParameter' + index: 0 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.none' + requiredIf: "overflow == 'Overflow.visible'" + - kind: 'removeParameter' + name: 'overflow' + variables: + overflow: + kind: 'fragment' + value: 'arguments[overflow]' + + # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + - title: "Migrate to 'clipBehavior'" + date: 2020-08-20 + element: + uris: [ 'rendering.dart' ] + field: 'clipToSize' + inClass: 'RenderListWheelViewport' + changes: + - kind: 'rename' + newName: 'clipBehavior' + + # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + - title: "Migrate to 'clipBehavior'" + date: 2020-08-20 + element: + uris: [ 'rendering.dart' ] + constructor: '' + inClass: 'RenderListWheelViewport' + oneOf: + - if: "clipToSize == 'true'" + changes: + - kind: 'addParameter' + index: 13 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.hardEdge' + requiredIf: "clipToSize == 'true'" + - kind: 'removeParameter' + name: 'clipToSize' + - if: "clipToSize == 'false'" + changes: + - kind: 'addParameter' + index: 13 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.none' + requiredIf: "clipToSize == 'false'" + - kind: 'removeParameter' + name: 'clipToSize' + variables: + clipToSize: + kind: 'fragment' + value: 'arguments[clipToSize]' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_services.yaml b/packages/flutter/lib/fix_data/fix_services.yaml new file mode 100644 index 000000000000..b409e6c7564a --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_services.yaml @@ -0,0 +1,73 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are from the Services library. * +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/60320 + - title: "Migrate to 'viewId'" + date: 2020-07-05 + element: + uris: [ 'services.dart' ] + getter: id + inClass: 'TextureAndroidViewController' + changes: + - kind: 'rename' + newName: 'viewId' + + # Changes made in https://github.com/flutter/flutter/pull/60320 + - title: "Migrate to 'viewId'" + date: 2020-07-05 + element: + uris: [ 'services.dart' ] + getter: id + inClass: 'SurfaceAndroidViewController' + changes: + - kind: 'rename' + newName: 'viewId' + + # Changes made in https://github.com/flutter/flutter/pull/81303 + - title: "Migrate to 'setEnabledSystemUIMode'" + date: 2021-06-08 + element: + uris: [ 'services.dart' ] + method: 'setEnabledSystemUIOverlays' + inClass: 'SystemChrome' + changes: + - kind: 'rename' + newName: 'setEnabledSystemUIMode' + - kind: 'removeParameter' + index: 0 + - kind: 'addParameter' + index: 0 + name: 'mode' + style: required_positional + argumentValue: + expression: 'SystemUiMode.manual' + - kind: 'addParameter' + index: 1 + name: 'overlays' + style: optional_named + argumentValue: + expression: '{% overlays %}' + requiredIf: "overlays != ''" + variables: + overlays: + kind: 'fragment' + value: 'arguments[0]' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_template.yaml b/packages/flutter/lib/fix_data/fix_template.yaml new file mode 100644 index 000000000000..a11962a57d1a --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_template.yaml @@ -0,0 +1,24 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are [for CLASS] from the library. * + +# Uncomment version & transforms, and follow with fixes. +# version: 1 +# transforms: + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_widgets/fix_actions.yaml b/packages/flutter/lib/fix_data/fix_widgets/fix_actions.yaml new file mode 100644 index 000000000000..56cf1dc8a848 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_widgets/fix_actions.yaml @@ -0,0 +1,83 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are for Actions from the Widgets library. * +# For fixes to +# * BuildContext: fix_build_context.yaml +# * Element: fix_element.yaml +# * ListWheelScrollView: fix_list_wheel_scroll_view.yaml +# * Widgets (general): fix_widgets.yaml +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/68921. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'invoke' + inClass: 'Actions' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeInvoke' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68921. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'find' + inClass: 'Actions' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeFind' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68921. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'handler' + inClass: 'Actions' + changes: + - kind: 'removeParameter' + name: 'nullOk' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_widgets/fix_build_context.yaml b/packages/flutter/lib/fix_data/fix_widgets/fix_build_context.yaml new file mode 100644 index 000000000000..4fd4db33a684 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_widgets/fix_build_context.yaml @@ -0,0 +1,169 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are for BuildContext from the Widgets library. * +# For fixes to +# * Actions: fix_actions.yaml +# * Element: fix_element.yaml +# * ListWheelScrollView: fix_list_wheel_scroll_view.yaml +# * Widgets (general): fix_widgets.yaml +version: 1 +transforms: + # Change made in https://github.com/flutter/flutter/pull/44189. + - title: "Rename to 'dependOnInheritedElement'" + date: 2019-11-22 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + inClass: 'BuildContext' + method: 'inheritFromElement' + changes: + - kind: 'rename' + newName: 'dependOnInheritedElement' + + # Change made in https://github.com/flutter/flutter/pull/44189. + - title: "Migrate to 'dependOnInheritedWidgetOfExactType'" + date: 2019-11-22 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + inClass: 'BuildContext' + method: 'inheritFromWidgetOfExactType' + changes: + - kind: 'rename' + newName: 'dependOnInheritedWidgetOfExactType' + - kind: 'removeParameter' + index: 0 + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: fragment + value: 'arguments[0]' + + # Change made in https://github.com/flutter/flutter/pull/44189. + - title: "Migrate to 'getElementForInheritedWidgetOfExactType'" + date: 2019-11-22 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + inClass: 'BuildContext' + method: 'ancestorInheritedElementForWidgetOfExactType' + changes: + - kind: 'rename' + newName: 'getElementForInheritedWidgetOfExactType' + - kind: 'removeParameter' + index: 0 + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: fragment + value: 'arguments[0]' + + # Change made in https://github.com/flutter/flutter/pull/44189. + - title: "Migrate to 'findAncestorWidgetOfExactType'" + date: 2019-11-22 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + inClass: 'BuildContext' + method: 'ancestorWidgetOfExactType' + changes: + - kind: 'rename' + newName: 'findAncestorWidgetOfExactType' + - kind: 'removeParameter' + index: 0 + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: fragment + value: 'arguments[0]' + + # Change made in https://github.com/flutter/flutter/pull/44189. + - title: "Migrate to 'findAncestorStateOfType'" + date: 2019-11-22 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + inClass: 'BuildContext' + method: 'ancestorStateOfType' + changes: + - kind: 'rename' + newName: 'findAncestorStateOfType' + - kind: 'removeParameter' + index: 0 + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: fragment + value: 'arguments[0].typeArguments[0]' + + # Change made in https://github.com/flutter/flutter/pull/44189. + - title: "Migrate to 'rootAncestorStateOfType'" + date: 2019-11-22 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + inClass: 'BuildContext' + method: 'rootAncestorStateOfType' + changes: + - kind: 'rename' + newName: 'findRootAncestorStateOfType' + - kind: 'removeParameter' + index: 0 + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: fragment + value: 'arguments[0].typeArguments[0]' + + # Change made in https://github.com/flutter/flutter/pull/44189. + - title: "Migrate to 'ancestorRenderObjectOfType'" + date: 2019-11-22 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + inClass: 'BuildContext' + method: 'ancestorRenderObjectOfType' + changes: + - kind: 'rename' + newName: 'findAncestorRenderObjectOfType' + - kind: 'removeParameter' + index: 0 + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: fragment + value: 'arguments[0].typeArguments[0]' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_widgets/fix_element.yaml b/packages/flutter/lib/fix_data/fix_widgets/fix_element.yaml new file mode 100644 index 000000000000..bf615802b61e --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_widgets/fix_element.yaml @@ -0,0 +1,169 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are for Element from the Widgets library. * +# For fixes to +# * Actions: fix_actions.yaml +# * BuildContext: fix_build_context.yaml +# * ListWheelScrollView: fix_list_wheel_scroll_view.yaml +# * Widgets (general): fix_widgets.yaml +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/44189. + - title: "Rename to 'dependOnInheritedElement'" + date: 2020-12-23 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'inheritFromElement' + inClass: 'Element' + changes: + - kind: 'rename' + newName: 'dependOnInheritedElement' + + # Changes made in https://github.com/flutter/flutter/pull/44189. + - title: "Rename to 'dependOnInheritedWidgetOfExactType'" + date: 2020-09-14 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'inheritFromWidgetOfExactType' + inClass: 'Element' + changes: + - kind: 'rename' + newName: 'dependOnInheritedWidgetOfExactType' + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: 'fragment' + value: 'arguments[0]' + - kind: 'removeParameter' + index: 0 + + # Changes made in https://github.com/flutter/flutter/pull/44189. + - title: "Rename to 'getElementForInheritedWidgetOfExactType'" + date: 2020-09-14 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'ancestorInheritedElementForWidgetOfExactType' + inClass: 'Element' + changes: + - kind: 'rename' + newName: 'getElementForInheritedWidgetOfExactType' + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: 'fragment' + value: 'arguments[0]' + - kind: 'removeParameter' + index: 0 + + # Changes made in https://github.com/flutter/flutter/pull/44189. + - title: "Rename to 'getElementForInheritedWidgetOfExactType'" + date: 2020-12-23 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'ancestorWidgetOfExactType' + inClass: 'Element' + changes: + - kind: 'rename' + newName: 'findAncestorWidgetOfExactType' + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: 'fragment' + value: 'arguments[0]' + - kind: 'removeParameter' + index: 0 + + # Changes made in https://github.com/flutter/flutter/pull/44189. + - title: "Rename to 'findAncestorStateOfType'" + date: 2020-12-23 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'ancestorStateOfType' + inClass: 'Element' + changes: + - kind: 'rename' + newName: 'findAncestorStateOfType' + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: 'fragment' + value: 'arguments[0].typeArguments[0]' + - kind: 'removeParameter' + index: 0 + + # Changes made in https://github.com/flutter/flutter/pull/44189. + - title: "Rename to 'findAncestorRenderObjectOfType'" + date: 2020-12-23 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'ancestorRenderObjectOfType' + inClass: 'Element' + changes: + - kind: 'rename' + newName: 'findAncestorRenderObjectOfType' + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: 'fragment' + value: 'arguments[0].typeArguments[0]' + - kind: 'removeParameter' + index: 0 + + # Changes made in https://github.com/flutter/flutter/pull/44189. + - title: "Rename to 'findAncestorRenderObjectOfType'" + date: 2020-12-23 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'rootAncestorStateOfType' + inClass: 'Element' + changes: + - kind: 'rename' + newName: 'findRootAncestorStateOfType' + - kind: 'addTypeParameter' + index: 0 + name: 'T' + argumentValue: + expression: '{% type %}' + variables: + type: + kind: 'fragment' + value: 'arguments[0].typeArguments[0]' + - kind: 'removeParameter' + index: 0 + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_widgets/fix_list_wheel_scroll_view.yaml b/packages/flutter/lib/fix_data/fix_widgets/fix_list_wheel_scroll_view.yaml new file mode 100644 index 000000000000..426d503fa23b --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_widgets/fix_list_wheel_scroll_view.yaml @@ -0,0 +1,107 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are for ListWheelScrollView from the Widgets library. * +# For fixes to +# * Actions: fix_actions.yaml +# * BuildContext: fix_build_context.yaml +# * Element: fix_element.yaml +# * Widgets (general): fix_widgets.yaml +version: 1 +transforms: + # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + - title: "Migrate to 'clipBehavior'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: 'useDelegate' + inClass: 'ListWheelScrollView' + oneOf: + - if: "clipToSize == 'true'" + changes: + - kind: 'addParameter' + index: 13 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.hardEdge' + requiredIf: "clipToSize == 'true'" + - kind: 'removeParameter' + name: 'clipToSize' + - if: "clipToSize == 'false'" + changes: + - kind: 'addParameter' + index: 13 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.none' + requiredIf: "clipToSize == 'false'" + - kind: 'removeParameter' + name: 'clipToSize' + variables: + clipToSize: + kind: 'fragment' + value: 'arguments[clipToSize]' + + # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + - title: "Migrate to 'clipBehavior'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'clipToSize' + inClass: 'ListWheelScrollView' + changes: + - kind: 'rename' + newName: 'clipBehavior' + + # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + - title: "Migrate to 'clipBehavior'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'ListWheelScrollView' + oneOf: + - if: "clipToSize == 'true'" + changes: + - kind: 'addParameter' + index: 13 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.hardEdge' + requiredIf: "clipToSize == 'true'" + - kind: 'removeParameter' + name: 'clipToSize' + - if: "clipToSize == 'false'" + changes: + - kind: 'addParameter' + index: 13 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.none' + requiredIf: "clipToSize == 'false'" + - kind: 'removeParameter' + name: 'clipToSize' + variables: + clipToSize: + kind: 'fragment' + value: 'arguments[clipToSize]' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/lib/fix_data/fix_widgets/fix_widgets.yaml b/packages/flutter/lib/fix_data/fix_widgets/fix_widgets.yaml new file mode 100644 index 000000000000..47d25d49a729 --- /dev/null +++ b/packages/flutter/lib/fix_data/fix_widgets/fix_widgets.yaml @@ -0,0 +1,845 @@ +# Copyright 2014 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For details regarding the *Flutter Fix* feature, see +# https://flutter.dev/docs/development/tools/flutter-fix + +# Please add new fixes to the top of the file, separated by one blank line +# from other fixes. In a comment, include a link to the PR where the change +# requiring the fix was made. + +# Every fix must be tested. See the flutter/packages/flutter/test_fixes/README.md +# file for instructions on testing these data driven fixes. + +# For documentation about this file format, see +# https://dart.dev/go/data-driven-fixes. + +# * Fixes in this file are from the Widgets library. * +# For fixes to +# * Actions: fix_actions.yaml +# * BuildContext: fix_build_context.yaml +# * Element: fix_element.yaml +# * ListWheelScrollView: fix_list_wheel_scroll_view.yaml +version: 1 +transforms: + # Changes made in https://github.com/flutter/flutter/pull/87839 + - title: "Migrate to 'disallowIndicator'" + date: 2021-08-06 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'disallowGlow' + inClass: 'OverscrollIndicatorNotification' + changes: + - kind: 'rename' + newName: 'disallowIndicator' + + # Changes made in https://github.com/flutter/flutter/pull/66305 + - title: "Migrate to 'clipBehavior'" + date: 2020-09-22 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'overflow' + inClass: 'Stack' + changes: + - kind: 'rename' + newName: 'clipBehavior' + + # Changes made in https://github.com/flutter/flutter/pull/66305 + - title: "Migrate to 'clipBehavior'" + date: 2020-09-22 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'Stack' + oneOf: + - if: "overflow == 'Overflow.clip'" + changes: + - kind: 'addParameter' + index: 0 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.hardEdge' + requiredIf: "overflow == 'Overflow.clip'" + - kind: 'removeParameter' + name: 'overflow' + - if: "overflow == 'Overflow.visible'" + changes: + - kind: 'addParameter' + index: 0 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.none' + requiredIf: "overflow == 'Overflow.visible'" + - kind: 'removeParameter' + name: 'overflow' + variables: + overflow: + kind: 'fragment' + value: 'arguments[overflow]' + + # Changes made in https://github.com/flutter/flutter/pull/45941 + - title: "Rename to 'deferFirstFrame'" + date: 2020-12-23 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'deferFirstFrameReport' + inClass: 'WidgetsBinding' + changes: + - kind: 'rename' + newName: 'deferFirstFrame' + + # Changes made in https://github.com/flutter/flutter/pull/45941 + - title: "Rename to 'allowFirstFrame'" + date: 2020-12-23 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'allowFirstFrameReport' + inClass: 'WidgetsBinding' + changes: + - kind: 'rename' + newName: 'allowFirstFrame' + + # Changes made in https://github.com/flutter/flutter/pull/44189 + - title: "Rename to 'dependOnInheritedElement'" + date: 2020-12-23 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'inheritFromElement' + inClass: 'StatefulElement' + changes: + - kind: 'rename' + newName: 'dependOnInheritedElement' + + # Changes made in https://github.com/flutter/flutter/pull/61648 + - title: "Migrate to 'autovalidateMode'" + date: 2020-09-02 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'autovalidate' + inClass: 'Form' + changes: + - kind: 'rename' + newName: 'autovalidateMode' + + # Changes made in https://github.com/flutter/flutter/pull/61648 + - title: "Migrate to 'autovalidateMode'" + date: 2020-09-02 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'Form' + oneOf: + - if: "autovalidate == 'true'" + changes: + - kind: 'addParameter' + index: 0 + name: 'autovalidateMode' + style: optional_named + argumentValue: + expression: 'AutovalidateMode.always' + requiredIf: "autovalidate == 'true'" + - kind: 'removeParameter' + name: 'autovalidate' + - if: "autovalidate == 'false'" + changes: + - kind: 'addParameter' + index: 0 + name: 'autovalidateMode' + style: optional_named + argumentValue: + expression: 'AutovalidateMode.disabled' + requiredIf: "autovalidate == 'false'" + - kind: 'removeParameter' + name: 'autovalidate' + variables: + autovalidate: + kind: 'fragment' + value: 'arguments[autovalidate]' + + # Changes made in https://github.com/flutter/flutter/pull/61648 + - title: "Migrate to 'autovalidateMode'" + date: 2020-09-02 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'autovalidate' + inClass: 'FormField' + changes: + - kind: 'rename' + newName: 'autovalidateMode' + + # Changes made in https://github.com/flutter/flutter/pull/61648 + - title: "Migrate to 'autovalidateMode'" + date: 2020-09-02 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'FormField' + oneOf: + - if: "autovalidate == 'true'" + changes: + - kind: 'addParameter' + index: 0 + name: 'autovalidateMode' + style: optional_named + argumentValue: + expression: 'AutovalidateMode.always' + requiredIf: "autovalidate == 'true'" + - kind: 'removeParameter' + name: 'autovalidate' + - if: "autovalidate == 'false'" + changes: + - kind: 'addParameter' + index: 0 + name: 'autovalidateMode' + style: optional_named + argumentValue: + expression: 'AutovalidateMode.disabled' + requiredIf: "autovalidate == 'false'" + - kind: 'removeParameter' + name: 'autovalidate' + variables: + autovalidate: + kind: 'fragment' + value: 'arguments[autovalidate]' + + # Changes made in https://github.com/flutter/flutter/pull/70726. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'Navigator' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68736. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'MediaQuery' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68925. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'SliverAnimatedList' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68925. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'AnimatedList' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68921. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'Shortcuts' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68917. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'Focus' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68917. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'FocusTraversalGroup' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68917. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'FocusTraversalOrder' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68911. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'localeOf' + inClass: 'Localizations' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeLocaleOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68910. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'Router' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/59127 + - title: "Migrate to 'label'" + date: 2020-07-09 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'title' + inClass: 'BottomNavigationBarItem' + changes: + - kind: 'rename' + newName: 'label' + + # Changes made in https://github.com/flutter/flutter/pull/59127 + - title: "Migrate to 'label'" + date: 2020-07-09 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'BottomNavigationBarItem' + changes: + - kind: 'renameParameter' + oldName: 'title' + newName: 'label' + + # Changes made in https://github.com/flutter/flutter/pull/79160 + - title: "Migrate to 'dragAnchorStrategy'" + date: 2021-04-05 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'dragAnchor' + inClass: 'Draggable' + changes: + - kind: 'rename' + newName: 'dragAnchorStrategy' + + # Changes made in https://github.com/flutter/flutter/pull/79160 + - title: "Migrate to 'dragAnchorStrategy'" + date: 2021-04-05 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'Draggable' + oneOf: + - if: "dragAnchor == 'DragAnchor.child'" + changes: + - kind: 'addParameter' + index: 9 + name: 'dragAnchorStrategy' + style: optional_named + argumentValue: + expression: 'childDragAnchorStrategy' + requiredIf: "dragAnchor == 'DragAnchor.child'" + - kind: 'removeParameter' + name: 'dragAnchor' + - if: "dragAnchor == 'DragAnchor.pointer'" + changes: + - kind: 'addParameter' + index: 9 + name: 'dragAnchorStrategy' + style: optional_named + argumentValue: + expression: 'pointerDragAnchorStrategy' + requiredIf: "dragAnchor == 'DragAnchor.pointer'" + - kind: 'removeParameter' + name: 'dragAnchor' + variables: + dragAnchor: + kind: 'fragment' + value: 'arguments[dragAnchor]' + + # Changes made in https://github.com/flutter/flutter/pull/79160 + - title: "Migrate to 'dragAnchorStrategy'" + date: 2021-04-05 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'dragAnchor' + inClass: 'LongPressDraggable' + changes: + - kind: 'rename' + newName: 'dragAnchorStrategy' + + # Changes made in https://github.com/flutter/flutter/pull/79160 + - title: "Migrate to 'dragAnchorStrategy'" + date: 2021-04-05 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'LongPressDraggable' + oneOf: + - if: "dragAnchor == 'DragAnchor.child'" + changes: + - kind: 'addParameter' + index: 9 + name: 'dragAnchorStrategy' + style: optional_named + argumentValue: + expression: 'childDragAnchorStrategy' + requiredIf: "dragAnchor == 'DragAnchor.child'" + - kind: 'removeParameter' + name: 'dragAnchor' + - if: "dragAnchor == 'DragAnchor.pointer'" + changes: + - kind: 'addParameter' + index: 9 + name: 'dragAnchorStrategy' + style: optional_named + argumentValue: + expression: 'pointerDragAnchorStrategy' + requiredIf: "dragAnchor == 'DragAnchor.pointer'" + - kind: 'removeParameter' + name: 'dragAnchor' + variables: + dragAnchor: + kind: 'fragment' + value: 'arguments[dragAnchor]' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'removeRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'removeChildRenderObject' + inClass: 'RenderObjectToWidgetElement' + changes: + - kind: 'rename' + newName: 'removeRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'moveRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'moveChildRenderObject' + inClass: 'RenderObjectToWidgetElement' + changes: + - kind: 'rename' + newName: 'moveRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'insertRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'insertChildRenderObject' + inClass: 'RenderObjectToWidgetElement' + changes: + - kind: 'rename' + newName: 'insertRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'removeRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'removeChildRenderObject' + inClass: 'SliverMultiBoxAdaptorElement' + changes: + - kind: 'rename' + newName: 'removeRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'moveRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'moveChildRenderObject' + inClass: 'SliverMultiBoxAdaptorElement' + changes: + - kind: 'rename' + newName: 'moveRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'insertRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'insertChildRenderObject' + inClass: 'SliverMultiBoxAdaptorElement' + changes: + - kind: 'rename' + newName: 'insertRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'removeRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'removeChildRenderObject' + inClass: 'SingleChildRenderObjectElement' + changes: + - kind: 'rename' + newName: 'removeRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'moveRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'moveChildRenderObject' + inClass: 'SingleChildRenderObjectElement' + changes: + - kind: 'rename' + newName: 'moveRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'insertRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'insertChildRenderObject' + inClass: 'SingleChildRenderObjectElement' + changes: + - kind: 'rename' + newName: 'insertRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'removeRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'removeChildRenderObject' + inClass: 'MultiChildRenderObjectElement' + changes: + - kind: 'rename' + newName: 'removeRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'moveRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'moveChildRenderObject' + inClass: 'MultiChildRenderObjectElement' + changes: + - kind: 'rename' + newName: 'moveRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'insertRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'insertChildRenderObject' + inClass: 'MultiChildRenderObjectElement' + changes: + - kind: 'rename' + newName: 'insertRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'removeRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'removeChildRenderObject' + inClass: 'ListWheelElement' + changes: + - kind: 'rename' + newName: 'removeRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'moveRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'moveChildRenderObject' + inClass: 'ListWheelElement' + changes: + - kind: 'rename' + newName: 'moveRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'insertRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'insertChildRenderObject' + inClass: 'ListWheelElement' + changes: + - kind: 'rename' + newName: 'insertRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'removeRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'removeChildRenderObject' + inClass: 'LeafRenderObjectElement' + changes: + - kind: 'rename' + newName: 'removeRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'moveRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'moveChildRenderObject' + inClass: 'LeafRenderObjectElement' + changes: + - kind: 'rename' + newName: 'moveRenderObjectChild' + + # Changes made in https://github.com/flutter/flutter/pull/64254 + - title: "Migrate to 'insertRenderObjectChild'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'insertChildRenderObject' + inClass: 'LeafRenderObjectElement' + changes: + - kind: 'rename' + newName: 'insertRenderObjectChild' + + # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + - title: "Migrate to 'clipBehavior'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'clipToSize' + inClass: 'ListWheelViewport' + changes: + - kind: 'rename' + newName: 'clipBehavior' + + # Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + - title: "Migrate to 'clipBehavior'" + date: 2020-08-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'ListWheelViewport' + oneOf: + - if: "clipToSize == 'true'" + changes: + - kind: 'addParameter' + index: 13 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.hardEdge' + requiredIf: "clipToSize == 'true'" + - kind: 'removeParameter' + name: 'clipToSize' + - if: "clipToSize == 'false'" + changes: + - kind: 'addParameter' + index: 13 + name: 'clipBehavior' + style: optional_named + argumentValue: + expression: 'Clip.none' + requiredIf: "clipToSize == 'false'" + - kind: 'removeParameter' + name: 'clipToSize' + variables: + clipToSize: + kind: 'fragment' + value: 'arguments[clipToSize]' + + # Changes made in https://github.com/flutter/flutter/pull/96957 + - title: "Migrate to 'thumbVisibility'" + date: 2022-01-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'isAlwaysShown' + inClass: 'RawScrollbar' + changes: + - kind: 'rename' + newName: 'thumbVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/96957 + - title: "Migrate to 'thumbVisibility'" + date: 2022-01-20 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'RawScrollbar' + changes: + - kind: 'renameParameter' + oldName: 'isAlwaysShown' + newName: 'thumbVisibility' + + # Changes made in https://github.com/flutter/flutter/pull/100381 + - title: "Migrate 'TextSelectionOverlay.fadeDuration' to SelectionOverlay.fadeDuration" + date: 2022-03-18 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'fadeDuration' + inClass: 'TextSelectionOverlay' + changes: + - kind: 'replacedBy' + newElement: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + field: 'fadeDuration' + inClass: 'SelectionOverlay' + + # Changes made in https://github.com/flutter/flutter/pull/78588 + - title: "Migrate to 'buildOverscrollIndicator'" + date: 2021-03-18 + element: + uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ] + method: 'buildViewportChrome' + inClass: 'ScrollBehavior' + changes: + - kind: 'rename' + newName: 'buildOverscrollIndicator' + +# Before adding a new fix: read instructions at the top of this file. diff --git a/packages/flutter/test_fixes/README.md b/packages/flutter/test_fixes/README.md index 78c0b2a75d62..3b25e3a64d36 100644 --- a/packages/flutter/test_fixes/README.md +++ b/packages/flutter/test_fixes/README.md @@ -1,24 +1,30 @@ ## Directory contents The Dart files and golden master `.expect` files in this directory are used to -test the [`dart fix` framework](https://dart.dev/tools/dart-fix) refactorings used by the Flutter framework. +test the [`dart fix` framework](https://dart.dev/tools/dart-fix) refactorings +used by the Flutter framework. -See the flutter/packages/flutter/lib/fix_data.yaml file for the current package:flutter -data driven fixes. +See the flutter/packages/flutter/lib/fix_data directory for the current +package:flutter data-driven fixes. -To run these tests locally, execute this command in the flutter/packages/flutter/test_fixes -directory. +To run these tests locally, execute this command in the +flutter/packages/flutter/test_fixes directory. ```sh dart fix --compare-to-golden ``` -For more documentation about this folder, see https://dart.dev/go/data-driven-fixes#test-folder. +For more documentation about Data Driven Fixes, see +https://dart.dev/go/data-driven-fixes#test-folder. + +To learn more about how fixes are authored in package:flutter, see +https://github.com/flutter/flutter/wiki/Data-driven-Fixes ## When making structural changes to this directory -Note that the tests in this directory are also invoked from external repositories. -Specifically, the CI system for the dart-lang/sdk repo runs these tests in order to -ensure that changes to the dart fix file format do not break Flutter. +Note that the tests in this directory are also invoked from external +repositories. Specifically, the CI system for the dart-lang/sdk repo runs these +tests in order to ensure that changes to the dart fix file format do not break +Flutter. See [tools/bots/flutter/analyze_flutter_flutter.sh](https://github.com/dart-lang/sdk/blob/main/tools/bots/flutter/analyze_flutter_flutter.sh) for where the tests are invoked. diff --git a/packages/flutter/test_fixes/cupertino.dart b/packages/flutter/test_fixes/cupertino/cupertino.dart similarity index 100% rename from packages/flutter/test_fixes/cupertino.dart rename to packages/flutter/test_fixes/cupertino/cupertino.dart diff --git a/packages/flutter/test_fixes/cupertino.dart.expect b/packages/flutter/test_fixes/cupertino/cupertino.dart.expect similarity index 100% rename from packages/flutter/test_fixes/cupertino.dart.expect rename to packages/flutter/test_fixes/cupertino/cupertino.dart.expect diff --git a/packages/flutter/test_fixes/gestures.dart b/packages/flutter/test_fixes/gestures/gestures.dart similarity index 100% rename from packages/flutter/test_fixes/gestures.dart rename to packages/flutter/test_fixes/gestures/gestures.dart diff --git a/packages/flutter/test_fixes/gestures.dart.expect b/packages/flutter/test_fixes/gestures/gestures.dart.expect similarity index 100% rename from packages/flutter/test_fixes/gestures.dart.expect rename to packages/flutter/test_fixes/gestures/gestures.dart.expect diff --git a/packages/flutter/test_fixes/material.dart b/packages/flutter/test_fixes/material.dart deleted file mode 100644 index ae88f25bb2b5..000000000000 --- a/packages/flutter/test_fixes/material.dart +++ /dev/null @@ -1,710 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/material.dart'; - -void main() { - // Generic reference variables. - BuildContext context; - RenderObjectWidget renderObjectWidget; - RenderObject renderObject; - Object object; - - // Changes made in https://github.com/flutter/flutter/pull/26259 - Scaffold scaffold = Scaffold(resizeToAvoidBottomPadding: true); - scaffold = Scaffold(error: ''); - final bool resize = scaffold.resizeToAvoidBottomPadding; - - // Change made in https://github.com/flutter/flutter/pull/15303 - showDialog(child: Text('Fix me.')); - showDialog(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/44189 - const Element element = Element(myWidget); - element.inheritFromElement(ancestor); - element.inheritFromWidgetOfExactType(targetType); - element.ancestorInheritedElementForWidgetOfExactType(targetType); - element.ancestorWidgetOfExactType(targetType); - element.ancestorStateOfType(TypeMatcher()); - element.rootAncestorStateOfType(TypeMatcher()); - element.ancestorRenderObjectOfType(TypeMatcher()); - - // Changes made in https://github.com/flutter/flutter/pull/45941 and https://github.com/flutter/flutter/pull/83843 - final WidgetsBinding binding = WidgetsBinding.instance!; - binding.deferFirstFrameReport(); - binding.allowFirstFrameReport(); - - // Changes made in https://github.com/flutter/flutter/pull/44189 - const StatefulElement statefulElement = StatefulElement(myWidget); - statefulElement.inheritFromElement(ancestor); - - // Changes made in https://github.com/flutter/flutter/pull/44189 - const BuildContext buildContext = Element(myWidget); - buildContext.inheritFromElement(ancestor); - buildContext.inheritFromWidgetOfExactType(targetType); - buildContext.ancestorInheritedElementForWidgetOfExactType(targetType); - buildContext.ancestorWidgetOfExactType(targetType); - buildContext.ancestorStateOfType(TypeMatcher()); - buildContext.rootAncestorStateOfType(TypeMatcher()); - buildContext.ancestorRenderObjectOfType(TypeMatcher()); - - // Changes made in https://github.com/flutter/flutter/pull/66305 - const Stack stack = Stack(overflow: Overflow.visible); - const Stack stack = Stack(overflow: Overflow.clip); - const Stack stack = Stack(error: ''); - final behavior = stack.overflow; - - // Changes made in https://github.com/flutter/flutter/pull/61648 - const Form form = Form(autovalidate: true); - const Form form = Form(autovalidate: false); - const Form form = Form(error: ''); - final autoMode = form.autovalidate; - - // Changes made in https://github.com/flutter/flutter/pull/61648 - const FormField formField = FormField(autovalidate: true); - const FormField formField = FormField(autovalidate: false); - const FormField formField = FormField(error: ''); - final autoMode = formField.autovalidate; - - // Changes made in https://github.com/flutter/flutter/pull/61648 - const TextFormField textFormField = TextFormField(autovalidate: true); - const TextFormField textFormField = TextFormField(autovalidate: false); - const TextFormField textFormField = TextFormField(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/61648 - const DropdownButtonFormField dropDownButtonFormField = DropdownButtonFormField(autovalidate: true); - const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(autovalidate: false); - const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/48547 - var TextTheme textTheme = TextTheme( - display4: displayStyle4, - display3: displayStyle3, - display2: displayStyle2, - display1: displayStyle1, - headline: headlineStyle, - title: titleStyle, - subhead: subheadStyle, - body2: body2Style, - body1: body1Style, - caption: captionStyle, - button: buttonStyle, - subtitle: subtitleStyle, - overline: overlineStyle, - ); - var TextTheme textTheme = TextTheme(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/48547 - var TextTheme copiedTextTheme = TextTheme.copyWith( - display4: displayStyle4, - display3: displayStyle3, - display2: displayStyle2, - display1: displayStyle1, - headline: headlineStyle, - title: titleStyle, - subhead: subheadStyle, - body2: body2Style, - body1: body1Style, - caption: captionStyle, - button: buttonStyle, - subtitle: subtitleStyle, - overline: overlineStyle, - ); - var TextTheme copiedTextTheme = TextTheme.copyWith(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/48547 - var style; - style = textTheme.display4; - style = textTheme.display3; - style = textTheme.display2; - style = textTheme.display1; - style = textTheme.headline; - style = textTheme.title; - style = textTheme.subhead; - style = textTheme.body2; - style = textTheme.body1; - style = textTheme.caption; - style = textTheme.button; - style = textTheme.subtitle; - style = textTheme.overline; - - // Changes made in https://github.com/flutter/flutter/pull/68736 - MediaQuery.of(context, nullOk: true); - MediaQuery.of(context, nullOk: false); - MediaQuery.of(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/70726 - Navigator.of(context, nullOk: true); - Navigator.of(context, nullOk: false); - Navigator.of(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/68908 - ScaffoldMessenger.of(context, nullOk: true); - ScaffoldMessenger.of(context, nullOk: false); - ScaffoldMessenger.of(error: ''); - Scaffold.of(error: ''); - Scaffold.of(context, nullOk: true); - Scaffold.of(context, nullOk: false); - - // Changes made in https://github.com/flutter/flutter/pull/68910 - Router.of(context, nullOk: true); - Router.of(context, nullOk: false); - Router.of(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/68911 - Localizations.localeOf(context, nullOk: true); - Localizations.localeOf(context, nullOk: false); - Localizations.localeOf(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/68917 - FocusTraversalOrder.of(context, nullOk: true); - FocusTraversalOrder.of(context, nullOk: false); - FocusTraversalOrder.of(error: ''); - FocusTraversalGroup.of(error: ''); - FocusTraversalGroup.of(context, nullOk: true); - FocusTraversalGroup.of(context, nullOk: false); - Focus.of(context, nullOk: true); - Focus.of(context, nullOk: false); - Focus.of(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/68921 - Shortcuts.of(context, nullOk: true); - Shortcuts.of(context, nullOk: false); - Shortcuts.of(error: ''); - Actions.find(error: ''); - Actions.find(context, nullOk: true); - Actions.find(context, nullOk: false); - Actions.handler(context, nullOk: true); - Actions.handler(context, nullOk: false); - Actions.handler(error: ''); - Actions.invoke(error: ''); - Actions.invoke(context, nullOk: true); - Actions.invoke(context, nullOk: false); - - // Changes made in https://github.com/flutter/flutter/pull/68925 - AnimatedList.of(context, nullOk: true); - AnimatedList.of(context, nullOk: false); - AnimatedList.of(error: ''); - SliverAnimatedList.of(error: ''); - SliverAnimatedList.of(context, nullOk: true); - SliverAnimatedList.of(context, nullOk: false); - - // Changes made in https://github.com/flutter/flutter/pull/68905 - MaterialBasedCupertinoThemeData.resolveFrom(context, nullOk: true); - MaterialBasedCupertinoThemeData.resolveFrom(context, nullOk: false); - MaterialBasedCupertinoThemeData.resolveFrom(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/72043 - TextField(maxLengthEnforced: true); - TextField(maxLengthEnforced: false); - TextField(error: ''); - final TextField textField; - textField.maxLengthEnforced; - TextFormField(maxLengthEnforced: true); - TextFormField(maxLengthEnforced: false); - TextFormField(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/59127 - const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(title: myTitle); - const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(); - const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(error: ''); - bottomNavigationBarItem.title; - - // Changes made in https://github.com/flutter/flutter/pull/65246 - RectangularSliderTrackShape(disabledThumbGapWidth: 2.0); - RectangularSliderTrackShape(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/46115 - const InputDecoration inputDecoration = InputDecoration(hasFloatingPlaceholder: true); - InputDecoration(hasFloatingPlaceholder: false); - InputDecoration(); - InputDecoration(error: ''); - InputDecoration.collapsed(hasFloatingPlaceholder: true); - InputDecoration.collapsed(hasFloatingPlaceholder: false); - InputDecoration.collapsed(); - InputDecoration.collapsed(error: ''); - inputDecoration.hasFloatingPlaceholder; - const InputDecorationTheme inputDecorationTheme = InputDecorationTheme(hasFloatingPlaceholder: true); - InputDecorationTheme(hasFloatingPlaceholder: false); - InputDecorationTheme(); - InputDecorationTheme(error: ''); - inputDecorationTheme.hasFloatingPlaceholder; - inputDecorationTheme.copyWith(hasFloatingPlaceholder: false); - inputDecorationTheme.copyWith(hasFloatingPlaceholder: true); - inputDecorationTheme.copyWith(); - inputDecorationTheme.copyWith(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/66482 - ThemeData(textSelectionColor: Colors.red); - ThemeData(cursorColor: Colors.blue); - ThemeData(textSelectionHandleColor: Colors.yellow); - ThemeData(useTextSelectionTheme: false); - ThemeData(textSelectionColor: Colors.red, useTextSelectionTheme: false); - ThemeData(cursorColor: Colors.blue, useTextSelectionTheme: false); - ThemeData(textSelectionHandleColor: Colors.yellow, useTextSelectionTheme: false); - ThemeData( - textSelectionColor: Colors.red, - cursorColor: Colors.blue, - ); - ThemeData( - textSelectionHandleColor: Colors.yellow, - cursorColor: Colors.blue, - ); - ThemeData( - textSelectionColor: Colors.red, - textSelectionHandleColor: Colors.yellow, - ); - ThemeData( - textSelectionColor: Colors.red, - cursorColor: Colors.blue, - useTextSelectionTheme: false, - ); - ThemeData( - textSelectionHandleColor: Colors.yellow, - cursorColor: Colors.blue, - useTextSelectionTheme: true, - ); - ThemeData( - textSelectionColor: Colors.red, - textSelectionHandleColor: Colors.yellow, - useTextSelectionTheme: false, - ); - ThemeData( - textSelectionColor: Colors.red, - cursorColor: Colors.blue, - textSelectionHandleColor: Colors.yellow, - ); - ThemeData( - textSelectionColor: Colors.red, - cursorColor: Colors.blue, - textSelectionHandleColor: Colors.yellow, - useTextSelectionTheme: false, - ); - ThemeData(error: ''); - ThemeData.raw(error: ''); - ThemeData.raw(textSelectionColor: Colors.red); - ThemeData.raw(cursorColor: Colors.blue); - ThemeData.raw(textSelectionHandleColor: Colors.yellow); - ThemeData.raw(useTextSelectionTheme: false); - ThemeData.raw(textSelectionColor: Colors.red, useTextSelectionTheme: false); - ThemeData.raw(cursorColor: Colors.blue, useTextSelectionTheme: false); - ThemeData.raw(textSelectionHandleColor: Colors.yellow, useTextSelectionTheme: false); - ThemeData.raw( - textSelectionColor: Colors.red, - cursorColor: Colors.blue, - ); - ThemeData.raw( - textSelectionHandleColor: Colors.yellow, - cursorColor: Colors.blue, - ); - ThemeData.raw( - textSelectionColor: Colors.red, - textSelectionHandleColor: Colors.yellow, - ); - ThemeData.raw( - textSelectionColor: Colors.red, - cursorColor: Colors.blue, - useTextSelectionTheme: false, - ); - ThemeData.raw( - textSelectionHandleColor: Colors.yellow, - cursorColor: Colors.blue, - useTextSelectionTheme: true, - ); - ThemeData.raw( - textSelectionColor: Colors.red, - textSelectionHandleColor: Colors.yellow, - useTextSelectionTheme: false, - ); - ThemeData.raw( - textSelectionColor: Colors.red, - cursorColor: Colors.blue, - textSelectionHandleColor: Colors.yellow, - ); - ThemeData.raw( - textSelectionColor: Colors.red, - cursorColor: Colors.blue, - textSelectionHandleColor: Colors.yellow, - useTextSelectionTheme: false, - ); - - // Changes made in https://github.com/flutter/flutter/pull/79160 - Draggable draggable = Draggable(); - draggable = Draggable(dragAnchor: DragAnchor.child); - draggable = Draggable(dragAnchor: DragAnchor.pointer); - draggable = Draggable(error: ''); - draggable.dragAnchor; - - // Changes made in https://github.com/flutter/flutter/pull/79160 - LongPressDraggable longPressDraggable = LongPressDraggable(); - longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.child); - longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.pointer); - longPressDraggable = LongPressDraggable(error: ''); - longPressDraggable.dragAnchor; - - // Changes made in https://github.com/flutter/flutter/pull/64254 - final LeafRenderObjectElement leafElement = LeafRenderObjectElement(); - leafElement.insertChildRenderObject(renderObject, object); - leafElement.moveChildRenderObject(renderObject, object); - leafElement.removeChildRenderObject(renderObject); - final ListWheelElement listWheelElement = ListWheelElement(); - listWheelElement.insertChildRenderObject(renderObject, object); - listWheelElement.moveChildRenderObject(renderObject, object); - listWheelElement.removeChildRenderObject(renderObject); - final MultiChildRenderObjectElement multiChildRenderObjectElement = MultiChildRenderObjectElement(); - multiChildRenderObjectElement.insertChildRenderObject(renderObject, object); - multiChildRenderObjectElement.moveChildRenderObject(renderObject, object); - multiChildRenderObjectElement.removeChildRenderObject(renderObject); - final SingleChildRenderObjectElement singleChildRenderObjectElement = SingleChildRenderObjectElement(); - singleChildRenderObjectElement.insertChildRenderObject(renderObject, object); - singleChildRenderObjectElement.moveChildRenderObject(renderObject, object); - singleChildRenderObjectElement.removeChildRenderObject(renderObject); - final SliverMultiBoxAdaptorElement sliverMultiBoxAdaptorElement = SliverMultiBoxAdaptorElement(); - sliverMultiBoxAdaptorElement.insertChildRenderObject(renderObject, object); - sliverMultiBoxAdaptorElement.moveChildRenderObject(renderObject, object); - sliverMultiBoxAdaptorElement.removeChildRenderObject(renderObject); - final RenderObjectToWidgetElement renderObjectToWidgetElement = RenderObjectToWidgetElement(widget); - renderObjectToWidgetElement.insertChildRenderObject(renderObject, object); - renderObjectToWidgetElement.moveChildRenderObject(renderObject, object); - renderObjectToWidgetElement.removeChildRenderObject(renderObject); - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(accentColor: Colors.red); - themeData = ThemeData(accentColor: Colors.red, primarySwatch: Colors.blue); - themeData = ThemeData(accentColor: Colors.red, colorScheme: ColorScheme.light()); - themeData = ThemeData(accentColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); - themeData = ThemeData(error: ''); - themeData = ThemeData.raw(accentColor: Colors.red); - themeData = ThemeData.raw(accentColor: Colors.red, primarySwatch: Colors.blue); - themeData = ThemeData.raw(accentColor: Colors.red, colorScheme: ColorScheme.light()); - themeData = ThemeData.raw(accentColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); - themeData = ThemeData.raw(error: ''); - themeData = themeData.copyWith(accentColor: Colors.red); - themeData = themeData.copyWith(error: ''); - themeData = themeData.copyWith(accentColor: Colors.red, primarySwatch: Colors.blue); - themeData = themeData.copyWith(accentColor: Colors.red, colorScheme: ColorScheme.light()); - themeData = themeData.copyWith(accentColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); - themeData.accentColor; - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(accentColorBrightness: Brightness.dark); - themeData = ThemeData.raw(accentColorBrightness: Brightness.dark); - themeData = themeData.copyWith(accentColorBrightness: Brightness.dark); - themeData.accentColorBrightness; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(accentTextTheme: TextTheme()); - themeData = ThemeData.raw(accentTextTheme: TextTheme()); - themeData = themeData.copyWith(accentTextTheme: TextTheme()); - themeData.accentTextTheme; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(accentIconTheme: IconThemeData()); - themeData = ThemeData.raw(accentIconTheme: IconThemeData()); - themeData = themeData.copyWith(accentIconTheme: IconThemeData()); - themeData.accentIconTheme; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(buttonColor: Colors.red); - themeData = ThemeData.raw(buttonColor: Colors.red); - themeData = themeData.copyWith(buttonColor: Colors.red); - themeData.buttonColor; // Removing field reference not supported. - - // Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - ListWheelScrollView listWheelScrollView = ListWheelScrollView(); - listWheelScrollView = ListWheelScrollView(clipToSize: true); - listWheelScrollView = ListWheelScrollView(clipToSize: false); - listWheelScrollView = ListWheelScrollView(error: ''); - listWheelScrollView = ListWheelScrollView.useDelegate(error: ''); - listWheelScrollView = ListWheelScrollView.useDelegate(); - listWheelScrollView = ListWheelScrollView.useDelegate(clipToSize: true); - listWheelScrollView = ListWheelScrollView.useDelegate(clipToSize: false); - listWheelScrollView.clipToSize; - ListWheelViewport listWheelViewport = ListWheelViewport(); - listWheelViewport = ListWheelViewport(clipToSize: true); - listWheelViewport = ListWheelViewport(clipToSize: false); - listWheelViewport = ListWheelViewport(error: ''); - listWheelViewport.clipToSize; - - // Changes made in https://github.com/flutter/flutter/pull/87281 - ThemeData themeData = ThemeData(); - themeData = ThemeData(fixTextFieldOutlineLabel: true); - themeData = ThemeData.raw(fixTextFieldOutlineLabel: true); - themeData = themeData.copyWith(fixTextFieldOutlineLabel: true); - themeData.fixTextFieldOutlineLabel; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/87839 - final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(leading: true); - final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(error: ''); - notification.disallowGlow(); - - // Changes made in https://github.com/flutter/flutter/pull/86198 - AppBar appBar = AppBar(); - appBar = AppBar(brightness: Brightness.light); - appBar = AppBar(brightness: Brightness.dark); - appBar = AppBar(error: ''); - appBar.brightness; - - SliverAppBar sliverAppBar = SliverAppBar(); - sliverAppBar = SliverAppBar(brightness: Brightness.light); - sliverAppBar = SliverAppBar(brightness: Brightness.dark); - sliverAppBar = SliverAppBar(error: ''); - sliverAppBar.brightness; - - AppBarTheme appBarTheme = AppBarTheme(); - appBarTheme = AppBarTheme(brightness: Brightness.light); - appBarTheme = AppBarTheme(brightness: Brightness.dark); - appBarTheme = AppBarTheme(error: ''); - appBarTheme = appBarTheme.copyWith(error: ''); - appBarTheme = appBarTheme.copyWith(brightness: Brightness.light); - appBarTheme = appBarTheme.copyWith(brightness: Brightness.dark); - appBarTheme.brightness; - - TextTheme myTextTheme = TextTheme(); - AppBar appBar = AppBar(); - appBar = AppBar(textTheme: myTextTheme); - appBar = AppBar(textTheme: myTextTheme); - - SliverAppBar sliverAppBar = SliverAppBar(); - sliverAppBar = SliverAppBar(textTheme: myTextTheme); - sliverAppBar = SliverAppBar(textTheme: myTextTheme); - - AppBarTheme appBarTheme = AppBarTheme(); - appBarTheme = AppBarTheme(textTheme: myTextTheme); - appBarTheme = AppBarTheme(textTheme: myTextTheme); - appBarTheme = appBarTheme.copyWith(textTheme: myTextTheme); - appBarTheme = appBarTheme.copyWith(textTheme: myTextTheme); - - AppBar appBar = AppBar(); - appBar = AppBar(backwardsCompatibility: true); - appBar = AppBar(backwardsCompatibility: false)); - appBar.backwardsCompatibility; // Removing field reference not supported. - - SliverAppBar sliverAppBar = SliverAppBar(); - sliverAppBar = SliverAppBar(backwardsCompatibility: true); - sliverAppBar = SliverAppBar(backwardsCompatibility: false); - sliverAppBar.backwardsCompatibility; // Removing field reference not supported. - - AppBarTheme appBarTheme = AppBarTheme(); - appBarTheme = AppBarTheme(backwardsCompatibility: true); - appBarTheme = AppBarTheme(backwardsCompatibility: false); - appBarTheme = appBarTheme.copyWith(backwardsCompatibility: true); - appBarTheme = appBarTheme.copyWith(backwardsCompatibility: false); - appBarTheme.backwardsCompatibility; // Removing field reference not supported. - - AppBarTheme appBarTheme = AppBarTheme(); - appBarTheme.color; - - // Changes made in https://github.com/flutter/flutter/pull/93396 - ThemeData themeData = ThemeData(); - themeData = ThemeData(primaryColorBrightness: Brightness.dark); - themeData = ThemeData.raw(primaryColorBrightness: Brightness.dark); - themeData = themeData.copyWith(primaryColorBrightness: Brightness.dark); - themeData.primaryColorBrightness; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/93427 - ColorScheme colorScheme = ColorScheme(); - colorScheme = ColorScheme(primaryVariant: Colors.black, secondaryVariant: Colors.white); - colorScheme = ColorScheme.light(primaryVariant: Colors.black, secondaryVariant: Colors.white); - colorScheme = ColorScheme.dark(primaryVariant: Colors.black, secondaryVariant: Colors.white); - colorScheme = ColorScheme.highContrastLight(primaryVariant: Colors.black, secondaryVariant: Colors.white); - colorScheme = ColorScheme.highContrastDark(primaryVariant: Colors.black, secondaryVariant: Colors.white); - colorScheme = colorScheme.copyWith(primaryVariant: Colors.black, secondaryVariant: Colors.white); - colorScheme.primaryVariant; // Removing field reference not supported. - colorScheme.secondaryVariant; - - // Changes made in https://github.com/flutter/flutter/pull/96115 - Icon icon = Icons.pie_chart_outlined; - - // Changes made in https://github.com/flutter/flutter/pull/96957 - Scrollbar scrollbar = Scrollbar(isAlwaysShown: true); - bool nowShowing = scrollbar.isAlwaysShown; - ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(isAlwaysShown: nowShowing); - scrollbarTheme.copyWith(isAlwaysShown: nowShowing); - scrollbarTheme.isAlwaysShown; - RawScrollbar rawScrollbar = RawScrollbar(isAlwaysShown: true); - nowShowing = rawScrollbar.isAlwaysShown; - - // Changes made in https://github.com/flutter/flutter/pull/96174 - Chip chip = Chip(); - chip = Chip(useDeleteButtonTooltip: false); - chip = Chip(useDeleteButtonTooltip: true); - chip = Chip(useDeleteButtonTooltip: false, deleteButtonTooltipMessage: 'Delete Tooltip'); - chip.useDeleteButtonTooltip; - - // Changes made in https://github.com/flutter/flutter/pull/96174 - InputChip inputChip = InputChip(); - inputChip = InputChip(useDeleteButtonTooltip: false); - inputChip = InputChip(useDeleteButtonTooltip: true); - inputChip = InputChip(useDeleteButtonTooltip: false, deleteButtonTooltipMessage: 'Delete Tooltip'); - inputChip.useDeleteButtonTooltip; - - // Changes made in https://github.com/flutter/flutter/pull/96174 - RawChip rawChip = Rawchip(); - rawChip = RawChip(useDeleteButtonTooltip: false); - rawChip = RawChip(useDeleteButtonTooltip: true); - rawChip = RawChip(useDeleteButtonTooltip: false, deleteButtonTooltipMessage: 'Delete Tooltip'); - rawChip.useDeleteButtonTooltip; - - // Change made in https://github.com/flutter/flutter/pull/100381 - TextSelectionOverlay.fadeDuration; - - // Changes made in https://github.com/flutter/flutter/pull/105291 - ButtonStyle elevationButtonStyle = ElevatedButton.styleFrom( - primary: Colors.blue, - onPrimary: Colors.white, - onSurface: Colors.grey, - ); - ButtonStyle outlinedButtonStyle = OutlinedButton.styleFrom( - primary: Colors.blue, - onSurface: Colors.grey, - ); - ButtonStyle textButtonStyle = TextButton.styleFrom( - primary: Colors.blue, - onSurface: Colors.grey, - ); - - // Changes made in https://github.com/flutter/flutter/pull/97972 - ThemeData themeData = ThemeData(); - themeData = ThemeData(toggleableActiveColor: Colors.black); - themeData = ThemeData( - toggleableActiveColor: Colors.black, - ); - themeData = ThemeData.raw(toggleableActiveColor: Colors.black); - themeData = ThemeData.raw( - toggleableActiveColor: Colors.black, - ); - themeData = themeData.copyWith(toggleableActiveColor: Colors.black); - themeData = themeData.copyWith( - toggleableActiveColor: Colors.black, - ); - themeData.toggleableActiveColor; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/109070 - ThemeData themeData = ThemeData(); - themeData = ThemeData(selectedRowColor: Brightness.dark); - themeData = ThemeData.raw(selectedRowColor: Brightness.dark); - themeData = themeData.copyWith(selectedRowColor: Brightness.dark); - themeData.selectedRowColor; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/109817 - var TextTheme textTheme = TextTheme( - headline1: headline1Style, - headline2: headline2Style, - headline3: headline3Style, - headline4: headline4Style, - headline5: headline5Style, - headline6: headline6Style, - subtitle1: subtitle1Style, - subtitle2: subtitle2Style, - bodyText1: bodyText1Style, - bodyText2: bodyText2Style, - caption: captionStyle, - button: buttonStyle, - overline: overlineStyle, - ); - var TextTheme textTheme = TextTheme(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/109817 - var TextTheme copiedTextTheme = TextTheme.copyWith( - headline1: headline1Style, - headline2: headline2Style, - headline3: headline3Style, - headline4: headline4Style, - headline5: headline5Style, - headline6: headline6Style, - subtitle1: subtitle1Style, - subtitle2: subtitle2Style, - bodyText1: bodyText1Style, - bodyText2: bodyText2Style, - caption: captionStyle, - button: buttonStyle, - overline: overlineStyle, - ); - var TextTheme copiedTextTheme = TextTheme.copyWith(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/109817 - var style; - style = textTheme.headline1; - style = textTheme.headline2; - style = textTheme.headline3; - style = textTheme.headline4; - style = textTheme.headline5; - style = textTheme.headline6; - style = textTheme.subtitle1; - style = textTheme.subtitle2; - style = textTheme.bodyText1; - style = textTheme.bodyText2; - style = textTheme.caption; - style = textTheme.button; - style = textTheme.overline; - - // Changes made in https://github.com/flutter/flutter/pull/110162 - ThemeData themeData = ThemeData(); - themeData = ThemeData(errorColor: Colors.red); - themeData = ThemeData(errorColor: Colors.red, primarySwatch: Colors.blue); - themeData = ThemeData(errorColor: Colors.red, colorScheme: ColorScheme.light()); - themeData = ThemeData(errorColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); - themeData = ThemeData(otherParam: ''); - themeData = ThemeData.raw(errorColor: Colors.red); - themeData = ThemeData.raw(errorColor: Colors.red, primarySwatch: Colors.blue); - themeData = ThemeData.raw(errorColor: Colors.red, colorScheme: ColorScheme.light()); - themeData = ThemeData.raw(errorColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); - themeData = ThemeData.raw(otherParam: ''); - themeData = themeData.copyWith(errorColor: Colors.red); - themeData = themeData.copyWith(otherParam: ''); - themeData = themeData.copyWith(errorColor: Colors.red, primarySwatch: Colors.blue); - themeData = themeData.copyWith(errorColor: Colors.red, colorScheme: ColorScheme.light()); - themeData = themeData.copyWith(errorColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); - themeData.errorColor; - - // Changes made in https://github.com/flutter/flutter/pull/110162 - ThemeData themeData = ThemeData(); - themeData = ThemeData(backgroundColor: Colors.grey); - themeData = ThemeData(backgroundColor: Colors.grey, primarySwatch: Colors.blue); - themeData = ThemeData(backgroundColor: Colors.grey, colorScheme: ColorScheme.light()); - themeData = ThemeData(backgroundColor: Colors.grey, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); - themeData = ThemeData(otherParam: ''); - themeData = ThemeData.raw(backgroundColor: Colors.grey); - themeData = ThemeData.raw(backgroundColor: Colors.grey, primarySwatch: Colors.blue); - themeData = ThemeData.raw(backgroundColor: Colors.grey, colorScheme: ColorScheme.light()); - themeData = ThemeData.raw(backgroundColor: Colors.grey, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); - themeData = ThemeData.raw(otherParam: ''); - themeData = themeData.copyWith(backgroundColor: Colors.grey); - themeData = themeData.copyWith(otherParam: ''); - themeData = themeData.copyWith(backgroundColor: Colors.grey, primarySwatch: Colors.blue); - themeData = themeData.copyWith(backgroundColor: Colors.grey, colorScheme: ColorScheme.light()); - themeData = themeData.copyWith(backgroundColor: Colors.grey, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); - themeData.backgroundColor; - - // Changes made in https://github.com/flutter/flutter/pull/110162 - ThemeData themeData = ThemeData(); - themeData = ThemeData(backgroundColor: Colors.grey, errorColor: Colors.red); - themeData = ThemeData.raw(backgroundColor: Colors.grey, errorColor: Colors.red); - themeData = themeData.copyWith(backgroundColor: Colors.grey, errorColor: Colors.red); - - // Changes made in https://github.com/flutter/flutter/pull/111080 - ThemeData themeData = ThemeData(); - themeData = ThemeData(bottomAppBarColor: Colors.green); - themeData = ThemeData.raw(bottomAppBarColor: Colors.green); - themeData = ThemeData.copyWith(bottomAppBarColor: Colors.green); - - // Changes made in https://github.com/flutter/flutter/pull/78588 - final ScrollBehavior scrollBehavior = ScrollBehavior(); - scrollBehavior.buildViewportChrome(context, child, axisDirection); - final MaterialScrollBehavior materialScrollBehavior = MaterialScrollBehavior(); - materialScrollBehavior.buildViewportChrome(context, child, axisDirection); - - // Changes made in https://github.com/flutter/flutter/pull/111706 - Scrollbar scrollbar = Scrollbar(showTrackOnHover: true); - bool nowShowing = scrollbar.showTrackOnHover; - ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(showTrackOnHover: nowShowing); - scrollbarTheme.copyWith(showTrackOnHover: nowShowing); - scrollbarTheme.showTrackOnHover; -} diff --git a/packages/flutter/test_fixes/material.dart.expect b/packages/flutter/test_fixes/material.dart.expect deleted file mode 100644 index 00f404e1b465..000000000000 --- a/packages/flutter/test_fixes/material.dart.expect +++ /dev/null @@ -1,914 +0,0 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - -void main() { - // Generic reference variables. - BuildContext context; - RenderObjectWidget renderObjectWidget; - RenderObject renderObject; - Object object; - - // Changes made in https://github.com/flutter/flutter/pull/26259 - Scaffold scaffold = Scaffold(resizeToAvoidBottomInset: true); - scaffold = Scaffold(error: ''); - final bool resize = scaffold.resizeToAvoidBottomInset; - - // Change made in https://github.com/flutter/flutter/pull/15303 - showDialog(builder: (context) => Text('Fix me.')); - showDialog(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/44189 - const Element element = Element(myWidget); - element.dependOnInheritedElement(ancestor); - element.dependOnInheritedWidgetOfExactType(); - element.getElementForInheritedWidgetOfExactType(); - element.findAncestorWidgetOfExactType(); - element.findAncestorStateOfType(); - element.findRootAncestorStateOfType(); - element.findAncestorRenderObjectOfType(); - - // Changes made in https://github.com/flutter/flutter/pull/45941 and https://github.com/flutter/flutter/pull/83843 - final WidgetsBinding binding = WidgetsBinding.instance; - binding.deferFirstFrame(); - binding.allowFirstFrame(); - - // Changes made in https://github.com/flutter/flutter/pull/44189 - const StatefulElement statefulElement = StatefulElement(myWidget); - statefulElement.dependOnInheritedElement(ancestor); - - // Changes made in https://github.com/flutter/flutter/pull/44189 - const BuildContext buildContext = Element(myWidget); - buildContext.dependOnInheritedElement(ancestor); - buildContext.dependOnInheritedWidgetOfExactType(); - buildContext.getElementForInheritedWidgetOfExactType(); - buildContext.findAncestorWidgetOfExactType(); - buildContext.findAncestorStateOfType(); - buildContext.findRootAncestorStateOfType(); - buildContext.findAncestorRenderObjectOfType(); - - // Changes made in https://github.com/flutter/flutter/pull/66305 - const Stack stack = Stack(clipBehavior: Clip.none); - const Stack stack = Stack(clipBehavior: Clip.hardEdge); - const Stack stack = Stack(error: ''); - final behavior = stack.clipBehavior; - - // Changes made in https://github.com/flutter/flutter/pull/61648 - const Form form = Form(autovalidateMode: AutovalidateMode.always); - const Form form = Form(autovalidateMode: AutovalidateMode.disabled); - const Form form = Form(error: ''); - final autoMode = form.autovalidateMode; - - // Changes made in https://github.com/flutter/flutter/pull/61648 - const FormField formField = FormField(autovalidateMode: AutovalidateMode.always); - const FormField formField = FormField(autovalidateMode: AutovalidateMode.disabled); - const FormField formField = FormField(error: ''); - final autoMode = formField.autovalidateMode; - - // Changes made in https://github.com/flutter/flutter/pull/61648 - const TextFormField textFormField = TextFormField(autovalidateMode: AutovalidateMode.always); - const TextFormField textFormField = TextFormField(autovalidateMode: AutovalidateMode.disabled); - const TextFormField textFormField = TextFormField(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/61648 - const DropdownButtonFormField dropDownButtonFormField = DropdownButtonFormField(autovalidateMode: AutovalidateMode.always); - const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(autovalidateMode: AutovalidateMode.disabled); - const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/48547 - var TextTheme textTheme = TextTheme( - displayLarge: displayStyle4, - displayMedium: displayStyle3, - displaySmall: displayStyle2, - headlineMedium: displayStyle1, - headlineSmall: headlineStyle, - titleLarge: titleStyle, - titleMedium: subheadStyle, - bodyLarge: body2Style, - bodyMedium: body1Style, - bodySmall: captionStyle, - labelLarge: buttonStyle, - titleSmall: subtitleStyle, - labelSmall: overlineStyle, - ); - var TextTheme textTheme = TextTheme(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/48547 - var TextTheme copiedTextTheme = TextTheme.copyWith( - displayLarge: displayStyle4, - displayMedium: displayStyle3, - displaySmall: displayStyle2, - headlineMedium: displayStyle1, - headlineSmall: headlineStyle, - titleLarge: titleStyle, - titleMedium: subheadStyle, - bodyLarge: body2Style, - bodyMedium: body1Style, - bodySmall: captionStyle, - labelLarge: buttonStyle, - titleSmall: subtitleStyle, - labelSmall: overlineStyle, - ); - var TextTheme copiedTextTheme = TextTheme.copyWith(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/48547 - var style; - style = textTheme.displayLarge; - style = textTheme.displayMedium; - style = textTheme.displaySmall; - style = textTheme.headlineMedium; - style = textTheme.headlineSmall; - style = textTheme.titleLarge; - style = textTheme.titleMedium; - style = textTheme.bodyLarge; - style = textTheme.bodyMedium; - style = textTheme.bodySmall; - style = textTheme.labelLarge; - style = textTheme.titleSmall; - style = textTheme.labelSmall; - - - // Changes made in https://github.com/flutter/flutter/pull/68736 - MediaQuery.maybeOf(context); - MediaQuery.of(context); - MediaQuery.of(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/70726 - Navigator.maybeOf(context); - Navigator.of(context); - Navigator.of(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/68908 - ScaffoldMessenger.maybeOf(context); - ScaffoldMessenger.of(context); - ScaffoldMessenger.of(error: ''); - Scaffold.of(error: ''); - Scaffold.maybeOf(context); - Scaffold.of(context); - - // Changes made in https://github.com/flutter/flutter/pull/68910 - Router.maybeOf(context); - Router.of(context); - Router.of(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/68911 - Localizations.maybeLocaleOf(context); - Localizations.localeOf(context); - Localizations.localeOf(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/68917 - FocusTraversalOrder.maybeOf(context); - FocusTraversalOrder.of(context); - FocusTraversalOrder.of(error: ''); - FocusTraversalGroup.of(error: ''); - FocusTraversalGroup.maybeOf(context); - FocusTraversalGroup.of(context); - Focus.maybeOf(context); - Focus.of(context); - Focus.of(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/68921 - Shortcuts.maybeOf(context); - Shortcuts.of(context); - Shortcuts.of(error: ''); - Actions.find(error: ''); - Actions.maybeFind(context); - Actions.find(context); - Actions.handler(context); - Actions.handler(context); - Actions.handler(error: ''); - Actions.invoke(error: ''); - Actions.maybeInvoke(context); - Actions.invoke(context); - - // Changes made in https://github.com/flutter/flutter/pull/68925 - AnimatedList.maybeOf(context); - AnimatedList.of(context); - AnimatedList.of(error: ''); - SliverAnimatedList.of(error: ''); - SliverAnimatedList.maybeOf(context); - SliverAnimatedList.of(context); - - // Changes made in https://github.com/flutter/flutter/pull/68905 - MaterialBasedCupertinoThemeData.resolveFrom(context); - MaterialBasedCupertinoThemeData.resolveFrom(context); - MaterialBasedCupertinoThemeData.resolveFrom(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/72043 - TextField(maxLengthEnforcement: MaxLengthEnforcement.enforce); - TextField(maxLengthEnforcement: MaxLengthEnforcement.none); - TextField(error: ''); - final TextField textField; - textField.maxLengthEnforcement; - TextFormField(maxLengthEnforcement: MaxLengthEnforcement.enforce); - TextFormField(maxLengthEnforcement: MaxLengthEnforcement.none); - TextFormField(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/59127 - const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(label: myTitle); - const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(); - const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(error: ''); - bottomNavigationBarItem.label; - - // Changes made in https://github.com/flutter/flutter/pull/65246 - RectangularSliderTrackShape(); - RectangularSliderTrackShape(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/46115 - const InputDecoration inputDecoration = InputDecoration(floatingLabelBehavior: FloatingLabelBehavior.auto); - InputDecoration(floatingLabelBehavior: FloatingLabelBehavior.never); - InputDecoration(); - InputDecoration(error: ''); - InputDecoration.collapsed(floatingLabelBehavior: FloatingLabelBehavior.auto); - InputDecoration.collapsed(floatingLabelBehavior: FloatingLabelBehavior.never); - InputDecoration.collapsed(); - InputDecoration.collapsed(error: ''); - inputDecoration.floatingLabelBehavior; - const InputDecorationTheme inputDecorationTheme = InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.auto); - InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.never); - InputDecorationTheme(); - InputDecorationTheme(error: ''); - inputDecorationTheme.floatingLabelBehavior; - inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.never); - inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.auto); - inputDecorationTheme.copyWith(); - inputDecorationTheme.copyWith(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/66482 - ThemeData(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red)); - ThemeData(textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue)); - ThemeData(textSelectionTheme: TextSelectionThemeData(selectionHandleColor: Colors.yellow)); - ThemeData(); - ThemeData(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red)); - ThemeData(textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue)); - ThemeData(textSelectionTheme: TextSelectionThemeData(selectionHandleColor: Colors.yellow)); - ThemeData( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red,), - ); - ThemeData( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionHandleColor: Colors.yellow,), - ); - ThemeData( - textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), - ); - ThemeData( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red,), - ); - ThemeData( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionHandleColor: Colors.yellow,), - ); - ThemeData( - textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), - ); - ThemeData( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), - ); - ThemeData( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), - ); - ThemeData(error: ''); - ThemeData.raw(error: ''); - ThemeData.raw(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red)); - ThemeData.raw(textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue)); - ThemeData.raw(textSelectionTheme: TextSelectionThemeData(selectionHandleColor: Colors.yellow)); - ThemeData.raw(); - ThemeData.raw(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red)); - ThemeData.raw(textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue)); - ThemeData.raw(textSelectionTheme: TextSelectionThemeData(selectionHandleColor: Colors.yellow)); - ThemeData.raw( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red,), - ); - ThemeData.raw( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionHandleColor: Colors.yellow,), - ); - ThemeData.raw( - textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), - ); - ThemeData.raw( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red,), - ); - ThemeData.raw( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionHandleColor: Colors.yellow,), - ); - ThemeData.raw( - textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), - ); - ThemeData.raw( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), - ); - ThemeData.raw( - textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), - ); - - // Changes made in https://github.com/flutter/flutter/pull/79160 - Draggable draggable = Draggable(); - draggable = Draggable(dragAnchorStrategy: childDragAnchorStrategy); - draggable = Draggable(dragAnchorStrategy: pointerDragAnchorStrategy); - draggable = Draggable(error: ''); - draggable.dragAnchorStrategy; - - // Changes made in https://github.com/flutter/flutter/pull/79160 - LongPressDraggable longPressDraggable = LongPressDraggable(); - longPressDraggable = LongPressDraggable(dragAnchorStrategy: childDragAnchorStrategy); - longPressDraggable = LongPressDraggable(dragAnchorStrategy: pointerDragAnchorStrategy); - longPressDraggable = LongPressDraggable(error: ''); - longPressDraggable.dragAnchorStrategy; - - // Changes made in https://github.com/flutter/flutter/pull/64254 - final LeafRenderObjectElement leafElement = LeafRenderObjectElement(); - leafElement.insertRenderObjectChild(renderObject, object); - leafElement.moveRenderObjectChild(renderObject, object); - leafElement.removeRenderObjectChild(renderObject); - final ListWheelElement listWheelElement = ListWheelElement(); - listWheelElement.insertRenderObjectChild(renderObject, object); - listWheelElement.moveRenderObjectChild(renderObject, object); - listWheelElement.removeRenderObjectChild(renderObject); - final MultiChildRenderObjectElement multiChildRenderObjectElement = MultiChildRenderObjectElement(); - multiChildRenderObjectElement.insertRenderObjectChild(renderObject, object); - multiChildRenderObjectElement.moveRenderObjectChild(renderObject, object); - multiChildRenderObjectElement.removeRenderObjectChild(renderObject); - final SingleChildRenderObjectElement singleChildRenderObjectElement = SingleChildRenderObjectElement(); - singleChildRenderObjectElement.insertRenderObjectChild(renderObject, object); - singleChildRenderObjectElement.moveRenderObjectChild(renderObject, object); - singleChildRenderObjectElement.removeRenderObjectChild(renderObject); - final SliverMultiBoxAdaptorElement sliverMultiBoxAdaptorElement = SliverMultiBoxAdaptorElement(); - sliverMultiBoxAdaptorElement.insertRenderObjectChild(renderObject, object); - sliverMultiBoxAdaptorElement.moveRenderObjectChild(renderObject, object); - sliverMultiBoxAdaptorElement.removeRenderObjectChild(renderObject); - final RenderObjectToWidgetElement renderObjectToWidgetElement = RenderObjectToWidgetElement(widget); - renderObjectToWidgetElement.insertRenderObjectChild(renderObject, object); - renderObjectToWidgetElement.moveRenderObjectChild(renderObject, object); - renderObjectToWidgetElement.removeRenderObjectChild(renderObject); - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red)); - themeData = ThemeData(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(secondary: Colors.red)); - themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(secondary: Colors.red)); - themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, secondary: Colors.red)); - themeData = ThemeData(error: ''); - themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red)); - themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(secondary: Colors.red)); - themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(secondary: Colors.red)); - themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, secondary: Colors.red)); - themeData = ThemeData.raw(error: ''); - themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red)); - themeData = themeData.copyWith(error: ''); - themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(secondary: Colors.red)); - themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(secondary: Colors.red)); - themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, secondary: Colors.red)); - themeData.colorScheme.secondary; - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(); - themeData = ThemeData.raw(); - themeData = themeData.copyWith(); - themeData.accentColorBrightness; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(); - themeData = ThemeData.raw(); - themeData = themeData.copyWith(); - themeData.accentTextTheme; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(); - themeData = ThemeData.raw(); - themeData = themeData.copyWith(); - themeData.accentIconTheme; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/81336 - ThemeData themeData = ThemeData(); - themeData = ThemeData(); - themeData = ThemeData.raw(); - themeData = themeData.copyWith(); - themeData.buttonColor; // Removing field reference not supported. - - // Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - ListWheelScrollView listWheelScrollView = ListWheelScrollView(); - listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.hardEdge); - listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.none); - listWheelScrollView = ListWheelScrollView(error: ''); - listWheelScrollView = ListWheelScrollView.useDelegate(error: ''); - listWheelScrollView = ListWheelScrollView.useDelegate(); - listWheelScrollView = ListWheelScrollView.useDelegate(clipBehavior: Clip.hardEdge); - listWheelScrollView = ListWheelScrollView.useDelegate(clipBehavior: Clip.none); - listWheelScrollView.clipBehavior; - ListWheelViewport listWheelViewport = ListWheelViewport(); - listWheelViewport = ListWheelViewport(clipBehavior: Clip.hardEdge); - listWheelViewport = ListWheelViewport(clipBehavior: Clip.none); - listWheelViewport = ListWheelViewport(error: ''); - listWheelViewport.clipBehavior; - - // Changes made in https://github.com/flutter/flutter/pull/87281 - ThemeData themeData = ThemeData(); - themeData = ThemeData(); - themeData = ThemeData.raw(); - themeData = themeData.copyWith(); - themeData.fixTextFieldOutlineLabel; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/87839 - final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(leading: true); - final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(error: ''); - notification.disallowIndicator(); - - // Changes made in https://github.com/flutter/flutter/pull/86198 - AppBar appBar = AppBar(); - appBar = AppBar(systemOverlayStyle: SystemUiOverlayStyle.dark); - appBar = AppBar(systemOverlayStyle: SystemUiOverlayStyle.light); - appBar = AppBar(error: ''); - appBar.systemOverlayStyle; - - SliverAppBar sliverAppBar = SliverAppBar(); - sliverAppBar = SliverAppBar(systemOverlayStyle: SystemUiOverlayStyle.dark); - sliverAppBar = SliverAppBar(systemOverlayStyle: SystemUiOverlayStyle.light); - sliverAppBar = SliverAppBar(error: ''); - sliverAppBar.systemOverlayStyle; - - AppBarTheme appBarTheme = AppBarTheme(); - appBarTheme = AppBarTheme(systemOverlayStyle: SystemUiOverlayStyle.dark); - appBarTheme = AppBarTheme(systemOverlayStyle: SystemUiOverlayStyle.light); - appBarTheme = AppBarTheme(error: ''); - appBarTheme = appBarTheme.copyWith(error: ''); - appBarTheme = appBarTheme.copyWith(systemOverlayStyle: SystemUiOverlayStyle.dark); - appBarTheme = appBarTheme.copyWith(systemOverlayStyle: SystemUiOverlayStyle.light); - appBarTheme.systemOverlayStyle; - - TextTheme myTextTheme = TextTheme(); - AppBar appBar = AppBar(); - appBar = AppBar(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); - appBar = AppBar(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); - - SliverAppBar sliverAppBar = SliverAppBar(); - sliverAppBar = SliverAppBar(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); - sliverAppBar = SliverAppBar(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); - - AppBarTheme appBarTheme = AppBarTheme(); - appBarTheme = AppBarTheme(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); - appBarTheme = AppBarTheme(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); - appBarTheme = appBarTheme.copyWith(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); - appBarTheme = appBarTheme.copyWith(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); - - AppBar appBar = AppBar(); - appBar = AppBar(); - appBar = AppBar()); - appBar.backwardsCompatibility; // Removing field reference not supported. - - SliverAppBar sliverAppBar = SliverAppBar(); - sliverAppBar = SliverAppBar(); - sliverAppBar = SliverAppBar(); - sliverAppBar.backwardsCompatibility; // Removing field reference not supported. - - AppBarTheme appBarTheme = AppBarTheme(); - appBarTheme = AppBarTheme(); - appBarTheme = AppBarTheme(); - appBarTheme = appBarTheme.copyWith(); - appBarTheme = appBarTheme.copyWith(); - appBarTheme.backwardsCompatibility; // Removing field reference not supported. - - AppBarTheme appBarTheme = AppBarTheme(); - appBarTheme.backgroundColor; - - // Changes made in https://github.com/flutter/flutter/pull/93396 - ThemeData themeData = ThemeData(); - themeData = ThemeData(); - themeData = ThemeData.raw(); - themeData = themeData.copyWith(); - themeData.primaryColorBrightness; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/93427 - ColorScheme colorScheme = ColorScheme(); - colorScheme = ColorScheme(); - colorScheme = ColorScheme.light(); - colorScheme = ColorScheme.dark(); - colorScheme = ColorScheme.highContrastLight(); - colorScheme = ColorScheme.highContrastDark(); - colorScheme = colorScheme.copyWith(); - colorScheme.primaryContainer; // Removing field reference not supported. - colorScheme.secondaryContainer; - - // Changes made in https://github.com/flutter/flutter/pull/96115 - Icon icon = Icons.pie_chart_outline; - - // Changes made in https://github.com/flutter/flutter/pull/96957 - Scrollbar scrollbar = Scrollbar(thumbVisibility: true); - bool nowShowing = scrollbar.thumbVisibility; - ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(thumbVisibility: nowShowing); - scrollbarTheme.copyWith(thumbVisibility: nowShowing); - scrollbarTheme.thumbVisibility; - RawScrollbar rawScrollbar = RawScrollbar(thumbVisibility: true); - nowShowing = rawScrollbar.thumbVisibility; - - // Changes made in https://github.com/flutter/flutter/pull/96174 - Chip chip = Chip(); - chip = Chip(deleteButtonTooltipMessage: ''); - chip = Chip(); - chip = Chip(deleteButtonTooltipMessage: 'Delete Tooltip'); - chip.deleteButtonTooltipMessage; - - // Changes made in https://github.com/flutter/flutter/pull/96174 - InputChip inputChip = InputChip(); - inputChip = InputChip(deleteButtonTooltipMessage: ''); - inputChip = InputChip(); - inputChip = InputChip(deleteButtonTooltipMessage: 'Delete Tooltip'); - inputChip.deleteButtonTooltipMessage; - - // Changes made in https://github.com/flutter/flutter/pull/96174 - RawChip rawChip = Rawchip(); - rawChip = RawChip(deleteButtonTooltipMessage: ''); - rawChip = RawChip(); - rawChip = RawChip(deleteButtonTooltipMessage: 'Delete Tooltip'); - rawChip.deleteButtonTooltipMessage; - - // Change made in https://github.com/flutter/flutter/pull/100381 - SelectionOverlay.fadeDuration; - - // Changes made in https://github.com/flutter/flutter/pull/105291 - ButtonStyle elevationButtonStyle = ElevatedButton.styleFrom( - foregroundColor: Colors.white, backgroundColor: Colors.blue, disabledForegroundColor: Colors.grey.withOpacity(0.38), disabledBackgroundColor: Colors.grey.withOpacity(0.12), - ); - ButtonStyle outlinedButtonStyle = OutlinedButton.styleFrom( - foregroundColor: Colors.blue, disabledForegroundColor: Colors.grey.withOpacity(0.38), - ); - ButtonStyle textButtonStyle = TextButton.styleFrom( - foregroundColor: Colors.blue, disabledForegroundColor: Colors.grey.withOpacity(0.38), - ); - - // Changes made in https://github.com/flutter/flutter/pull/97972 - ThemeData themeData = ThemeData(); - themeData = ThemeData(checkboxTheme: CheckboxThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), switchTheme: SwitchThemeData( - thumbColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - trackColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - )); - themeData = ThemeData( - checkboxTheme: CheckboxThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), switchTheme: SwitchThemeData( - thumbColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - trackColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), - ); - themeData = ThemeData.raw(checkboxTheme: CheckboxThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), switchTheme: SwitchThemeData( - thumbColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - trackColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - )); - themeData = ThemeData.raw( - checkboxTheme: CheckboxThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), switchTheme: SwitchThemeData( - thumbColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - trackColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), - ); - themeData = themeData.copyWith(checkboxTheme: CheckboxThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), switchTheme: SwitchThemeData( - thumbColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - trackColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - )); - themeData = themeData.copyWith( - checkboxTheme: CheckboxThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), switchTheme: SwitchThemeData( - thumbColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - trackColor: MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return Colors.black; - } - return null; - }), - ), - ); - themeData.toggleableActiveColor; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/109070 - ThemeData themeData = ThemeData(); - themeData = ThemeData(); - themeData = ThemeData.raw(); - themeData = themeData.copyWith(); - themeData.selectedRowColor; // Removing field reference not supported. - - // Changes made in https://github.com/flutter/flutter/pull/109817 - var TextTheme textTheme = TextTheme( - displayLarge: headline1Style, - displayMedium: headline2Style, - displaySmall: headline3Style, - headlineMedium: headline4Style, - headlineSmall: headline5Style, - titleLarge: headline6Style, - titleMedium: subtitle1Style, - titleSmall: subtitle2Style, - bodyLarge: bodyText1Style, - bodyMedium: bodyText2Style, - bodySmall: captionStyle, - labelLarge: buttonStyle, - labelSmall: overlineStyle, - ); - var TextTheme textTheme = TextTheme(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/109817 - var TextTheme copiedTextTheme = TextTheme.copyWith( - displayLarge: headline1Style, - displayMedium: headline2Style, - displaySmall: headline3Style, - headlineMedium: headline4Style, - headlineSmall: headline5Style, - titleLarge: headline6Style, - titleMedium: subtitle1Style, - titleSmall: subtitle2Style, - bodyLarge: bodyText1Style, - bodyMedium: bodyText2Style, - bodySmall: captionStyle, - labelLarge: buttonStyle, - labelSmall: overlineStyle, - ); - var TextTheme copiedTextTheme = TextTheme.copyWith(error: ''); - - // Changes made in https://github.com/flutter/flutter/pull/109817 - var style; - style = textTheme.displayLarge; - style = textTheme.displayMedium; - style = textTheme.displaySmall; - style = textTheme.headlineMedium; - style = textTheme.headlineSmall; - style = textTheme.titleLarge; - style = textTheme.titleMedium; - style = textTheme.titleSmall; - style = textTheme.bodyLarge; - style = textTheme.bodyMedium; - style = textTheme.bodySmall; - style = textTheme.labelLarge; - style = textTheme.labelSmall; - - // Changes made in https://github.com/flutter/flutter/pull/110162 - ThemeData themeData = ThemeData(); - themeData = ThemeData(colorScheme: ColorScheme(error: Colors.red)); - themeData = ThemeData(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(error: Colors.red)); - themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(error: Colors.red)); - themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, error: Colors.red)); - themeData = ThemeData(otherParam: ''); - themeData = ThemeData.raw(colorScheme: ColorScheme(error: Colors.red)); - themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(error: Colors.red)); - themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(error: Colors.red)); - themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, error: Colors.red)); - themeData = ThemeData.raw(otherParam: ''); - themeData = themeData.copyWith(colorScheme: ColorScheme(error: Colors.red)); - themeData = themeData.copyWith(otherParam: ''); - themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(error: Colors.red)); - themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(error: Colors.red)); - themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, error: Colors.red)); - themeData.colorScheme.error; - - // Changes made in https://github.com/flutter/flutter/pull/110162 - ThemeData themeData = ThemeData(); - themeData = ThemeData(colorScheme: ColorScheme(background: Colors.grey)); - themeData = ThemeData(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(background: Colors.grey)); - themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(background: Colors.grey)); - themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, background: Colors.grey)); - themeData = ThemeData(otherParam: ''); - themeData = ThemeData.raw(colorScheme: ColorScheme(background: Colors.grey)); - themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(background: Colors.grey)); - themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(background: Colors.grey)); - themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, background: Colors.grey)); - themeData = ThemeData.raw(otherParam: ''); - themeData = themeData.copyWith(colorScheme: ColorScheme(background: Colors.grey)); - themeData = themeData.copyWith(otherParam: ''); - themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(background: Colors.grey)); - themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(background: Colors.grey)); - themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, background: Colors.grey)); - themeData.colorScheme.background; - - // Changes made in https://github.com/flutter/flutter/pull/110162 - ThemeData themeData = ThemeData(); - themeData = ThemeData(colorScheme: ColorScheme(background: Colors.grey).copyWith(error: Colors.red)); - themeData = ThemeData.raw(colorScheme: ColorScheme(error: Colors.red).copyWith(background: Colors.grey)); - themeData = themeData.copyWith(colorScheme: ColorScheme(error: Colors.red).copyWith(background: Colors.grey)); - - // Changes made in https://github.com/flutter/flutter/pull/111080 - ThemeData themeData = ThemeData(); - themeData = ThemeData(bottomAppBarTheme: BottomAppBarTheme(color: Colors.green)); - themeData = ThemeData.raw(bottomAppBarTheme: BottomAppBarTheme(color: Colors.green)); - themeData = ThemeData.copyWith(bottomAppBarTheme: BottomAppBarTheme(color: Colors.green)); - - // Changes made in https://github.com/flutter/flutter/pull/78588 - final ScrollBehavior scrollBehavior = ScrollBehavior(); - scrollBehavior.buildOverscrollIndicator(context, child, axisDirection); - final MaterialScrollBehavior materialScrollBehavior = MaterialScrollBehavior(); - materialScrollBehavior.buildOverscrollIndicator(context, child, axisDirection); - - // Changes made in https://github.com/flutter/flutter/pull/111706 - Scrollbar scrollbar = Scrollbar(trackVisibility: true); - bool nowShowing = scrollbar.trackVisibility; - ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(trackVisibility: nowShowing); - scrollbarTheme.copyWith(trackVisibility: nowShowing); - scrollbarTheme.trackVisibility; -} diff --git a/packages/flutter/test_fixes/material/app_bar.dart b/packages/flutter/test_fixes/material/app_bar.dart new file mode 100644 index 000000000000..a92423d14517 --- /dev/null +++ b/packages/flutter/test_fixes/material/app_bar.dart @@ -0,0 +1,24 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/86198 + AppBar appBar = AppBar(); + appBar = AppBar(brightness: Brightness.light); + appBar = AppBar(brightness: Brightness.dark); + appBar = AppBar(error: ''); + appBar.brightness; + + TextTheme myTextTheme = TextTheme(); + AppBar appBar = AppBar(); + appBar = AppBar(textTheme: myTextTheme); + appBar = AppBar(textTheme: myTextTheme); + + AppBar appBar = AppBar(); + appBar = AppBar(backwardsCompatibility: true); + appBar = AppBar(backwardsCompatibility: false)); + appBar.backwardsCompatibility; // Removing field reference not supported. +} diff --git a/packages/flutter/test_fixes/material/app_bar.dart.expect b/packages/flutter/test_fixes/material/app_bar.dart.expect new file mode 100644 index 000000000000..8faa156577e4 --- /dev/null +++ b/packages/flutter/test_fixes/material/app_bar.dart.expect @@ -0,0 +1,25 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/86198 + AppBar appBar = AppBar(); + appBar = AppBar(systemOverlayStyle: SystemUiOverlayStyle.dark); + appBar = AppBar(systemOverlayStyle: SystemUiOverlayStyle.light); + appBar = AppBar(error: ''); + appBar.systemOverlayStyle; + + TextTheme myTextTheme = TextTheme(); + AppBar appBar = AppBar(); + appBar = AppBar(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); + appBar = AppBar(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); + + AppBar appBar = AppBar(); + appBar = AppBar(); + appBar = AppBar()); + appBar.backwardsCompatibility; // Removing field reference not supported. +} diff --git a/packages/flutter/test_fixes/material/app_bar_theme.dart b/packages/flutter/test_fixes/material/app_bar_theme.dart new file mode 100644 index 000000000000..ee890761d179 --- /dev/null +++ b/packages/flutter/test_fixes/material/app_bar_theme.dart @@ -0,0 +1,34 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/86198 + AppBarTheme appBarTheme = AppBarTheme(); + appBarTheme = AppBarTheme(brightness: Brightness.light); + appBarTheme = AppBarTheme(brightness: Brightness.dark); + appBarTheme = AppBarTheme(error: ''); + appBarTheme = appBarTheme.copyWith(error: ''); + appBarTheme = appBarTheme.copyWith(brightness: Brightness.light); + appBarTheme = appBarTheme.copyWith(brightness: Brightness.dark); + appBarTheme.brightness; + + TextTheme myTextTheme = TextTheme(); + AppBarTheme appBarTheme = AppBarTheme(); + appBarTheme = AppBarTheme(textTheme: myTextTheme); + appBarTheme = AppBarTheme(textTheme: myTextTheme); + appBarTheme = appBarTheme.copyWith(textTheme: myTextTheme); + appBarTheme = appBarTheme.copyWith(textTheme: myTextTheme); + + AppBarTheme appBarTheme = AppBarTheme(); + appBarTheme = AppBarTheme(backwardsCompatibility: true); + appBarTheme = AppBarTheme(backwardsCompatibility: false); + appBarTheme = appBarTheme.copyWith(backwardsCompatibility: true); + appBarTheme = appBarTheme.copyWith(backwardsCompatibility: false); + appBarTheme.backwardsCompatibility; // Removing field reference not supported. + + AppBarTheme appBarTheme = AppBarTheme(); + appBarTheme.color; +} diff --git a/packages/flutter/test_fixes/material/app_bar_theme.dart.expect b/packages/flutter/test_fixes/material/app_bar_theme.dart.expect new file mode 100644 index 000000000000..441ed711221c --- /dev/null +++ b/packages/flutter/test_fixes/material/app_bar_theme.dart.expect @@ -0,0 +1,35 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/86198 + AppBarTheme appBarTheme = AppBarTheme(); + appBarTheme = AppBarTheme(systemOverlayStyle: SystemUiOverlayStyle.dark); + appBarTheme = AppBarTheme(systemOverlayStyle: SystemUiOverlayStyle.light); + appBarTheme = AppBarTheme(error: ''); + appBarTheme = appBarTheme.copyWith(error: ''); + appBarTheme = appBarTheme.copyWith(systemOverlayStyle: SystemUiOverlayStyle.dark); + appBarTheme = appBarTheme.copyWith(systemOverlayStyle: SystemUiOverlayStyle.light); + appBarTheme.systemOverlayStyle; + + TextTheme myTextTheme = TextTheme(); + AppBarTheme appBarTheme = AppBarTheme(); + appBarTheme = AppBarTheme(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); + appBarTheme = AppBarTheme(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); + appBarTheme = appBarTheme.copyWith(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); + appBarTheme = appBarTheme.copyWith(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); + + AppBarTheme appBarTheme = AppBarTheme(); + appBarTheme = AppBarTheme(); + appBarTheme = AppBarTheme(); + appBarTheme = appBarTheme.copyWith(); + appBarTheme = appBarTheme.copyWith(); + appBarTheme.backwardsCompatibility; // Removing field reference not supported. + + AppBarTheme appBarTheme = AppBarTheme(); + appBarTheme.backgroundColor; +} diff --git a/packages/flutter/test_fixes/material/color_scheme.dart b/packages/flutter/test_fixes/material/color_scheme.dart new file mode 100644 index 000000000000..877d09d9b939 --- /dev/null +++ b/packages/flutter/test_fixes/material/color_scheme.dart @@ -0,0 +1,18 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/93427 + ColorScheme colorScheme = ColorScheme(); + colorScheme = ColorScheme(primaryVariant: Colors.black, secondaryVariant: Colors.white); + colorScheme = ColorScheme.light(primaryVariant: Colors.black, secondaryVariant: Colors.white); + colorScheme = ColorScheme.dark(primaryVariant: Colors.black, secondaryVariant: Colors.white); + colorScheme = ColorScheme.highContrastLight(primaryVariant: Colors.black, secondaryVariant: Colors.white); + colorScheme = ColorScheme.highContrastDark(primaryVariant: Colors.black, secondaryVariant: Colors.white); + colorScheme = colorScheme.copyWith(primaryVariant: Colors.black, secondaryVariant: Colors.white); + colorScheme.primaryVariant; // Removing field reference not supported. + colorScheme.secondaryVariant; +} diff --git a/packages/flutter/test_fixes/material/color_scheme.dart.expect b/packages/flutter/test_fixes/material/color_scheme.dart.expect new file mode 100644 index 000000000000..b270083dfbec --- /dev/null +++ b/packages/flutter/test_fixes/material/color_scheme.dart.expect @@ -0,0 +1,18 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/93427 + ColorScheme colorScheme = ColorScheme(); + colorScheme = ColorScheme(); + colorScheme = ColorScheme.light(); + colorScheme = ColorScheme.dark(); + colorScheme = ColorScheme.highContrastLight(); + colorScheme = ColorScheme.highContrastDark(); + colorScheme = colorScheme.copyWith(); + colorScheme.primaryContainer; // Removing field reference not supported. + colorScheme.secondaryContainer; +} diff --git a/packages/flutter/test_fixes/material/material.dart b/packages/flutter/test_fixes/material/material.dart new file mode 100644 index 000000000000..dffef1322f3a --- /dev/null +++ b/packages/flutter/test_fixes/material/material.dart @@ -0,0 +1,310 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Generic reference variables. + BuildContext context; + RenderObjectWidget renderObjectWidget; + RenderObject renderObject; + Object object; + + // Changes made in https://github.com/flutter/flutter/pull/26259 + Scaffold scaffold = Scaffold(resizeToAvoidBottomPadding: true); + scaffold = Scaffold(error: ''); + final bool resize = scaffold.resizeToAvoidBottomPadding; + + // Change made in https://github.com/flutter/flutter/pull/15303 + showDialog(child: Text('Fix me.')); + showDialog(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/44189 + const Element element = Element(myWidget); + element.inheritFromElement(ancestor); + element.inheritFromWidgetOfExactType(targetType); + element.ancestorInheritedElementForWidgetOfExactType(targetType); + element.ancestorWidgetOfExactType(targetType); + element.ancestorStateOfType(TypeMatcher()); + element.rootAncestorStateOfType(TypeMatcher()); + element.ancestorRenderObjectOfType(TypeMatcher()); + + // Changes made in https://github.com/flutter/flutter/pull/45941 and https://github.com/flutter/flutter/pull/83843 + final WidgetsBinding binding = WidgetsBinding.instance!; + binding.deferFirstFrameReport(); + binding.allowFirstFrameReport(); + + // Changes made in https://github.com/flutter/flutter/pull/44189 + const StatefulElement statefulElement = StatefulElement(myWidget); + statefulElement.inheritFromElement(ancestor); + + // Changes made in https://github.com/flutter/flutter/pull/44189 + const BuildContext buildContext = Element(myWidget); + buildContext.inheritFromElement(ancestor); + buildContext.inheritFromWidgetOfExactType(targetType); + buildContext.ancestorInheritedElementForWidgetOfExactType(targetType); + buildContext.ancestorWidgetOfExactType(targetType); + buildContext.ancestorStateOfType(TypeMatcher()); + buildContext.rootAncestorStateOfType(TypeMatcher()); + buildContext.ancestorRenderObjectOfType(TypeMatcher()); + + // Changes made in https://github.com/flutter/flutter/pull/66305 + const Stack stack = Stack(overflow: Overflow.visible); + const Stack stack = Stack(overflow: Overflow.clip); + const Stack stack = Stack(error: ''); + final behavior = stack.overflow; + + // Changes made in https://github.com/flutter/flutter/pull/61648 + const Form form = Form(autovalidate: true); + const Form form = Form(autovalidate: false); + const Form form = Form(error: ''); + final autoMode = form.autovalidate; + + // Changes made in https://github.com/flutter/flutter/pull/61648 + const FormField formField = FormField(autovalidate: true); + const FormField formField = FormField(autovalidate: false); + const FormField formField = FormField(error: ''); + final autoMode = formField.autovalidate; + + // Changes made in https://github.com/flutter/flutter/pull/61648 + const TextFormField textFormField = TextFormField(autovalidate: true); + const TextFormField textFormField = TextFormField(autovalidate: false); + const TextFormField textFormField = TextFormField(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/61648 + const DropdownButtonFormField dropDownButtonFormField = DropdownButtonFormField(autovalidate: true); + const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(autovalidate: false); + const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68736 + MediaQuery.of(context, nullOk: true); + MediaQuery.of(context, nullOk: false); + MediaQuery.of(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/70726 + Navigator.of(context, nullOk: true); + Navigator.of(context, nullOk: false); + Navigator.of(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68908 + ScaffoldMessenger.of(context, nullOk: true); + ScaffoldMessenger.of(context, nullOk: false); + ScaffoldMessenger.of(error: ''); + Scaffold.of(error: ''); + Scaffold.of(context, nullOk: true); + Scaffold.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68910 + Router.of(context, nullOk: true); + Router.of(context, nullOk: false); + Router.of(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68911 + Localizations.localeOf(context, nullOk: true); + Localizations.localeOf(context, nullOk: false); + Localizations.localeOf(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68917 + FocusTraversalOrder.of(context, nullOk: true); + FocusTraversalOrder.of(context, nullOk: false); + FocusTraversalOrder.of(error: ''); + FocusTraversalGroup.of(error: ''); + FocusTraversalGroup.of(context, nullOk: true); + FocusTraversalGroup.of(context, nullOk: false); + Focus.of(context, nullOk: true); + Focus.of(context, nullOk: false); + Focus.of(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68921 + Shortcuts.of(context, nullOk: true); + Shortcuts.of(context, nullOk: false); + Shortcuts.of(error: ''); + Actions.find(error: ''); + Actions.find(context, nullOk: true); + Actions.find(context, nullOk: false); + Actions.handler(context, nullOk: true); + Actions.handler(context, nullOk: false); + Actions.handler(error: ''); + Actions.invoke(error: ''); + Actions.invoke(context, nullOk: true); + Actions.invoke(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68925 + AnimatedList.of(context, nullOk: true); + AnimatedList.of(context, nullOk: false); + AnimatedList.of(error: ''); + SliverAnimatedList.of(error: ''); + SliverAnimatedList.of(context, nullOk: true); + SliverAnimatedList.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68905 + MaterialBasedCupertinoThemeData.resolveFrom(context, nullOk: true); + MaterialBasedCupertinoThemeData.resolveFrom(context, nullOk: false); + MaterialBasedCupertinoThemeData.resolveFrom(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/72043 + TextField(maxLengthEnforced: true); + TextField(maxLengthEnforced: false); + TextField(error: ''); + final TextField textField; + textField.maxLengthEnforced; + TextFormField(maxLengthEnforced: true); + TextFormField(maxLengthEnforced: false); + TextFormField(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/59127 + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(title: myTitle); + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(); + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(error: ''); + bottomNavigationBarItem.title; + + // Changes made in https://github.com/flutter/flutter/pull/65246 + RectangularSliderTrackShape(disabledThumbGapWidth: 2.0); + RectangularSliderTrackShape(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/46115 + const InputDecoration inputDecoration = InputDecoration(hasFloatingPlaceholder: true); + InputDecoration(hasFloatingPlaceholder: false); + InputDecoration(); + InputDecoration(error: ''); + InputDecoration.collapsed(hasFloatingPlaceholder: true); + InputDecoration.collapsed(hasFloatingPlaceholder: false); + InputDecoration.collapsed(); + InputDecoration.collapsed(error: ''); + inputDecoration.hasFloatingPlaceholder; + const InputDecorationTheme inputDecorationTheme = InputDecorationTheme(hasFloatingPlaceholder: true); + InputDecorationTheme(hasFloatingPlaceholder: false); + InputDecorationTheme(); + InputDecorationTheme(error: ''); + inputDecorationTheme.hasFloatingPlaceholder; + inputDecorationTheme.copyWith(hasFloatingPlaceholder: false); + inputDecorationTheme.copyWith(hasFloatingPlaceholder: true); + inputDecorationTheme.copyWith(); + inputDecorationTheme.copyWith(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/79160 + Draggable draggable = Draggable(); + draggable = Draggable(dragAnchor: DragAnchor.child); + draggable = Draggable(dragAnchor: DragAnchor.pointer); + draggable = Draggable(error: ''); + draggable.dragAnchor; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + LongPressDraggable longPressDraggable = LongPressDraggable(); + longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.child); + longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.pointer); + longPressDraggable = LongPressDraggable(error: ''); + longPressDraggable.dragAnchor; + + // Changes made in https://github.com/flutter/flutter/pull/64254 + final LeafRenderObjectElement leafElement = LeafRenderObjectElement(); + leafElement.insertChildRenderObject(renderObject, object); + leafElement.moveChildRenderObject(renderObject, object); + leafElement.removeChildRenderObject(renderObject); + final ListWheelElement listWheelElement = ListWheelElement(); + listWheelElement.insertChildRenderObject(renderObject, object); + listWheelElement.moveChildRenderObject(renderObject, object); + listWheelElement.removeChildRenderObject(renderObject); + final MultiChildRenderObjectElement multiChildRenderObjectElement = MultiChildRenderObjectElement(); + multiChildRenderObjectElement.insertChildRenderObject(renderObject, object); + multiChildRenderObjectElement.moveChildRenderObject(renderObject, object); + multiChildRenderObjectElement.removeChildRenderObject(renderObject); + final SingleChildRenderObjectElement singleChildRenderObjectElement = SingleChildRenderObjectElement(); + singleChildRenderObjectElement.insertChildRenderObject(renderObject, object); + singleChildRenderObjectElement.moveChildRenderObject(renderObject, object); + singleChildRenderObjectElement.removeChildRenderObject(renderObject); + final SliverMultiBoxAdaptorElement sliverMultiBoxAdaptorElement = SliverMultiBoxAdaptorElement(); + sliverMultiBoxAdaptorElement.insertChildRenderObject(renderObject, object); + sliverMultiBoxAdaptorElement.moveChildRenderObject(renderObject, object); + sliverMultiBoxAdaptorElement.removeChildRenderObject(renderObject); + final RenderObjectToWidgetElement renderObjectToWidgetElement = RenderObjectToWidgetElement(widget); + renderObjectToWidgetElement.insertChildRenderObject(renderObject, object); + renderObjectToWidgetElement.moveChildRenderObject(renderObject, object); + renderObjectToWidgetElement.removeChildRenderObject(renderObject); + + // Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + ListWheelScrollView listWheelScrollView = ListWheelScrollView(); + listWheelScrollView = ListWheelScrollView(clipToSize: true); + listWheelScrollView = ListWheelScrollView(clipToSize: false); + listWheelScrollView = ListWheelScrollView(error: ''); + listWheelScrollView = ListWheelScrollView.useDelegate(error: ''); + listWheelScrollView = ListWheelScrollView.useDelegate(); + listWheelScrollView = ListWheelScrollView.useDelegate(clipToSize: true); + listWheelScrollView = ListWheelScrollView.useDelegate(clipToSize: false); + listWheelScrollView.clipToSize; + ListWheelViewport listWheelViewport = ListWheelViewport(); + listWheelViewport = ListWheelViewport(clipToSize: true); + listWheelViewport = ListWheelViewport(clipToSize: false); + listWheelViewport = ListWheelViewport(error: ''); + listWheelViewport.clipToSize; + + // Changes made in https://github.com/flutter/flutter/pull/87839 + final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(leading: true); + final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(error: ''); + notification.disallowGlow(); + + // Changes made in https://github.com/flutter/flutter/pull/96115 + Icon icon = Icons.pie_chart_outlined; + + // Changes made in https://github.com/flutter/flutter/pull/96957 + Scrollbar scrollbar = Scrollbar(isAlwaysShown: true); + bool nowShowing = scrollbar.isAlwaysShown; + ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(isAlwaysShown: nowShowing); + scrollbarTheme.copyWith(isAlwaysShown: nowShowing); + scrollbarTheme.isAlwaysShown; + RawScrollbar rawScrollbar = RawScrollbar(isAlwaysShown: true); + nowShowing = rawScrollbar.isAlwaysShown; + + // Changes made in https://github.com/flutter/flutter/pull/96174 + Chip chip = Chip(); + chip = Chip(useDeleteButtonTooltip: false); + chip = Chip(useDeleteButtonTooltip: true); + chip = Chip(useDeleteButtonTooltip: false, deleteButtonTooltipMessage: 'Delete Tooltip'); + chip.useDeleteButtonTooltip; + + // Changes made in https://github.com/flutter/flutter/pull/96174 + InputChip inputChip = InputChip(); + inputChip = InputChip(useDeleteButtonTooltip: false); + inputChip = InputChip(useDeleteButtonTooltip: true); + inputChip = InputChip(useDeleteButtonTooltip: false, deleteButtonTooltipMessage: 'Delete Tooltip'); + inputChip.useDeleteButtonTooltip; + + // Changes made in https://github.com/flutter/flutter/pull/96174 + RawChip rawChip = Rawchip(); + rawChip = RawChip(useDeleteButtonTooltip: false); + rawChip = RawChip(useDeleteButtonTooltip: true); + rawChip = RawChip(useDeleteButtonTooltip: false, deleteButtonTooltipMessage: 'Delete Tooltip'); + rawChip.useDeleteButtonTooltip; + + // Change made in https://github.com/flutter/flutter/pull/100381 + TextSelectionOverlay.fadeDuration; + + // Changes made in https://github.com/flutter/flutter/pull/105291 + ButtonStyle elevationButtonStyle = ElevatedButton.styleFrom( + primary: Colors.blue, + onPrimary: Colors.white, + onSurface: Colors.grey, + ); + ButtonStyle outlinedButtonStyle = OutlinedButton.styleFrom( + primary: Colors.blue, + onSurface: Colors.grey, + ); + ButtonStyle textButtonStyle = TextButton.styleFrom( + primary: Colors.blue, + onSurface: Colors.grey, + ); + + // Changes made in https://github.com/flutter/flutter/pull/78588 + final ScrollBehavior scrollBehavior = ScrollBehavior(); + scrollBehavior.buildViewportChrome(context, child, axisDirection); + final MaterialScrollBehavior materialScrollBehavior = MaterialScrollBehavior(); + materialScrollBehavior.buildViewportChrome(context, child, axisDirection); + + // Changes made in https://github.com/flutter/flutter/pull/111706 + Scrollbar scrollbar = Scrollbar(showTrackOnHover: true); + bool nowShowing = scrollbar.showTrackOnHover; + ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(showTrackOnHover: nowShowing); + scrollbarTheme.copyWith(showTrackOnHover: nowShowing); + scrollbarTheme.showTrackOnHover; +} diff --git a/packages/flutter/test_fixes/material/material.dart.expect b/packages/flutter/test_fixes/material/material.dart.expect new file mode 100644 index 000000000000..290e79075d47 --- /dev/null +++ b/packages/flutter/test_fixes/material/material.dart.expect @@ -0,0 +1,306 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Generic reference variables. + BuildContext context; + RenderObjectWidget renderObjectWidget; + RenderObject renderObject; + Object object; + + // Changes made in https://github.com/flutter/flutter/pull/26259 + Scaffold scaffold = Scaffold(resizeToAvoidBottomInset: true); + scaffold = Scaffold(error: ''); + final bool resize = scaffold.resizeToAvoidBottomInset; + + // Change made in https://github.com/flutter/flutter/pull/15303 + showDialog(builder: (context) => Text('Fix me.')); + showDialog(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/44189 + const Element element = Element(myWidget); + element.dependOnInheritedElement(ancestor); + element.dependOnInheritedWidgetOfExactType(); + element.getElementForInheritedWidgetOfExactType(); + element.findAncestorWidgetOfExactType(); + element.findAncestorStateOfType(); + element.findRootAncestorStateOfType(); + element.findAncestorRenderObjectOfType(); + + // Changes made in https://github.com/flutter/flutter/pull/45941 and https://github.com/flutter/flutter/pull/83843 + final WidgetsBinding binding = WidgetsBinding.instance; + binding.deferFirstFrame(); + binding.allowFirstFrame(); + + // Changes made in https://github.com/flutter/flutter/pull/44189 + const StatefulElement statefulElement = StatefulElement(myWidget); + statefulElement.dependOnInheritedElement(ancestor); + + // Changes made in https://github.com/flutter/flutter/pull/44189 + const BuildContext buildContext = Element(myWidget); + buildContext.dependOnInheritedElement(ancestor); + buildContext.dependOnInheritedWidgetOfExactType(); + buildContext.getElementForInheritedWidgetOfExactType(); + buildContext.findAncestorWidgetOfExactType(); + buildContext.findAncestorStateOfType(); + buildContext.findRootAncestorStateOfType(); + buildContext.findAncestorRenderObjectOfType(); + + // Changes made in https://github.com/flutter/flutter/pull/66305 + const Stack stack = Stack(clipBehavior: Clip.none); + const Stack stack = Stack(clipBehavior: Clip.hardEdge); + const Stack stack = Stack(error: ''); + final behavior = stack.clipBehavior; + + // Changes made in https://github.com/flutter/flutter/pull/61648 + const Form form = Form(autovalidateMode: AutovalidateMode.always); + const Form form = Form(autovalidateMode: AutovalidateMode.disabled); + const Form form = Form(error: ''); + final autoMode = form.autovalidateMode; + + // Changes made in https://github.com/flutter/flutter/pull/61648 + const FormField formField = FormField(autovalidateMode: AutovalidateMode.always); + const FormField formField = FormField(autovalidateMode: AutovalidateMode.disabled); + const FormField formField = FormField(error: ''); + final autoMode = formField.autovalidateMode; + + // Changes made in https://github.com/flutter/flutter/pull/61648 + const TextFormField textFormField = TextFormField(autovalidateMode: AutovalidateMode.always); + const TextFormField textFormField = TextFormField(autovalidateMode: AutovalidateMode.disabled); + const TextFormField textFormField = TextFormField(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/61648 + const DropdownButtonFormField dropDownButtonFormField = DropdownButtonFormField(autovalidateMode: AutovalidateMode.always); + const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(autovalidateMode: AutovalidateMode.disabled); + const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68736 + MediaQuery.maybeOf(context); + MediaQuery.of(context); + MediaQuery.of(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/70726 + Navigator.maybeOf(context); + Navigator.of(context); + Navigator.of(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68908 + ScaffoldMessenger.maybeOf(context); + ScaffoldMessenger.of(context); + ScaffoldMessenger.of(error: ''); + Scaffold.of(error: ''); + Scaffold.maybeOf(context); + Scaffold.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68910 + Router.maybeOf(context); + Router.of(context); + Router.of(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68911 + Localizations.maybeLocaleOf(context); + Localizations.localeOf(context); + Localizations.localeOf(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68917 + FocusTraversalOrder.maybeOf(context); + FocusTraversalOrder.of(context); + FocusTraversalOrder.of(error: ''); + FocusTraversalGroup.of(error: ''); + FocusTraversalGroup.maybeOf(context); + FocusTraversalGroup.of(context); + Focus.maybeOf(context); + Focus.of(context); + Focus.of(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/68921 + Shortcuts.maybeOf(context); + Shortcuts.of(context); + Shortcuts.of(error: ''); + Actions.find(error: ''); + Actions.maybeFind(context); + Actions.find(context); + Actions.handler(context); + Actions.handler(context); + Actions.handler(error: ''); + Actions.invoke(error: ''); + Actions.maybeInvoke(context); + Actions.invoke(context); + + // Changes made in https://github.com/flutter/flutter/pull/68925 + AnimatedList.maybeOf(context); + AnimatedList.of(context); + AnimatedList.of(error: ''); + SliverAnimatedList.of(error: ''); + SliverAnimatedList.maybeOf(context); + SliverAnimatedList.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68905 + MaterialBasedCupertinoThemeData.resolveFrom(context); + MaterialBasedCupertinoThemeData.resolveFrom(context); + MaterialBasedCupertinoThemeData.resolveFrom(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/72043 + TextField(maxLengthEnforcement: MaxLengthEnforcement.enforce); + TextField(maxLengthEnforcement: MaxLengthEnforcement.none); + TextField(error: ''); + final TextField textField; + textField.maxLengthEnforcement; + TextFormField(maxLengthEnforcement: MaxLengthEnforcement.enforce); + TextFormField(maxLengthEnforcement: MaxLengthEnforcement.none); + TextFormField(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/59127 + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(label: myTitle); + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(); + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(error: ''); + bottomNavigationBarItem.label; + + // Changes made in https://github.com/flutter/flutter/pull/65246 + RectangularSliderTrackShape(); + RectangularSliderTrackShape(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/46115 + const InputDecoration inputDecoration = InputDecoration(floatingLabelBehavior: FloatingLabelBehavior.auto); + InputDecoration(floatingLabelBehavior: FloatingLabelBehavior.never); + InputDecoration(); + InputDecoration(error: ''); + InputDecoration.collapsed(floatingLabelBehavior: FloatingLabelBehavior.auto); + InputDecoration.collapsed(floatingLabelBehavior: FloatingLabelBehavior.never); + InputDecoration.collapsed(); + InputDecoration.collapsed(error: ''); + inputDecoration.floatingLabelBehavior; + const InputDecorationTheme inputDecorationTheme = InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.auto); + InputDecorationTheme(floatingLabelBehavior: FloatingLabelBehavior.never); + InputDecorationTheme(); + InputDecorationTheme(error: ''); + inputDecorationTheme.floatingLabelBehavior; + inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.never); + inputDecorationTheme.copyWith(floatingLabelBehavior: FloatingLabelBehavior.auto); + inputDecorationTheme.copyWith(); + inputDecorationTheme.copyWith(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/79160 + Draggable draggable = Draggable(); + draggable = Draggable(dragAnchorStrategy: childDragAnchorStrategy); + draggable = Draggable(dragAnchorStrategy: pointerDragAnchorStrategy); + draggable = Draggable(error: ''); + draggable.dragAnchorStrategy; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + LongPressDraggable longPressDraggable = LongPressDraggable(); + longPressDraggable = LongPressDraggable(dragAnchorStrategy: childDragAnchorStrategy); + longPressDraggable = LongPressDraggable(dragAnchorStrategy: pointerDragAnchorStrategy); + longPressDraggable = LongPressDraggable(error: ''); + longPressDraggable.dragAnchorStrategy; + + // Changes made in https://github.com/flutter/flutter/pull/64254 + final LeafRenderObjectElement leafElement = LeafRenderObjectElement(); + leafElement.insertRenderObjectChild(renderObject, object); + leafElement.moveRenderObjectChild(renderObject, object); + leafElement.removeRenderObjectChild(renderObject); + final ListWheelElement listWheelElement = ListWheelElement(); + listWheelElement.insertRenderObjectChild(renderObject, object); + listWheelElement.moveRenderObjectChild(renderObject, object); + listWheelElement.removeRenderObjectChild(renderObject); + final MultiChildRenderObjectElement multiChildRenderObjectElement = MultiChildRenderObjectElement(); + multiChildRenderObjectElement.insertRenderObjectChild(renderObject, object); + multiChildRenderObjectElement.moveRenderObjectChild(renderObject, object); + multiChildRenderObjectElement.removeRenderObjectChild(renderObject); + final SingleChildRenderObjectElement singleChildRenderObjectElement = SingleChildRenderObjectElement(); + singleChildRenderObjectElement.insertRenderObjectChild(renderObject, object); + singleChildRenderObjectElement.moveRenderObjectChild(renderObject, object); + singleChildRenderObjectElement.removeRenderObjectChild(renderObject); + final SliverMultiBoxAdaptorElement sliverMultiBoxAdaptorElement = SliverMultiBoxAdaptorElement(); + sliverMultiBoxAdaptorElement.insertRenderObjectChild(renderObject, object); + sliverMultiBoxAdaptorElement.moveRenderObjectChild(renderObject, object); + sliverMultiBoxAdaptorElement.removeRenderObjectChild(renderObject); + final RenderObjectToWidgetElement renderObjectToWidgetElement = RenderObjectToWidgetElement(widget); + renderObjectToWidgetElement.insertRenderObjectChild(renderObject, object); + renderObjectToWidgetElement.moveRenderObjectChild(renderObject, object); + renderObjectToWidgetElement.removeRenderObjectChild(renderObject); + + // Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + ListWheelScrollView listWheelScrollView = ListWheelScrollView(); + listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.hardEdge); + listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.none); + listWheelScrollView = ListWheelScrollView(error: ''); + listWheelScrollView = ListWheelScrollView.useDelegate(error: ''); + listWheelScrollView = ListWheelScrollView.useDelegate(); + listWheelScrollView = ListWheelScrollView.useDelegate(clipBehavior: Clip.hardEdge); + listWheelScrollView = ListWheelScrollView.useDelegate(clipBehavior: Clip.none); + listWheelScrollView.clipBehavior; + ListWheelViewport listWheelViewport = ListWheelViewport(); + listWheelViewport = ListWheelViewport(clipBehavior: Clip.hardEdge); + listWheelViewport = ListWheelViewport(clipBehavior: Clip.none); + listWheelViewport = ListWheelViewport(error: ''); + listWheelViewport.clipBehavior; + + // Changes made in https://github.com/flutter/flutter/pull/87839 + final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(leading: true); + final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(error: ''); + notification.disallowIndicator(); + + // Changes made in https://github.com/flutter/flutter/pull/96115 + Icon icon = Icons.pie_chart_outline; + + // Changes made in https://github.com/flutter/flutter/pull/96957 + Scrollbar scrollbar = Scrollbar(thumbVisibility: true); + bool nowShowing = scrollbar.thumbVisibility; + ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(thumbVisibility: nowShowing); + scrollbarTheme.copyWith(thumbVisibility: nowShowing); + scrollbarTheme.thumbVisibility; + RawScrollbar rawScrollbar = RawScrollbar(thumbVisibility: true); + nowShowing = rawScrollbar.thumbVisibility; + + // Changes made in https://github.com/flutter/flutter/pull/96174 + Chip chip = Chip(); + chip = Chip(deleteButtonTooltipMessage: ''); + chip = Chip(); + chip = Chip(deleteButtonTooltipMessage: 'Delete Tooltip'); + chip.deleteButtonTooltipMessage; + + // Changes made in https://github.com/flutter/flutter/pull/96174 + InputChip inputChip = InputChip(); + inputChip = InputChip(deleteButtonTooltipMessage: ''); + inputChip = InputChip(); + inputChip = InputChip(deleteButtonTooltipMessage: 'Delete Tooltip'); + inputChip.deleteButtonTooltipMessage; + + // Changes made in https://github.com/flutter/flutter/pull/96174 + RawChip rawChip = Rawchip(); + rawChip = RawChip(deleteButtonTooltipMessage: ''); + rawChip = RawChip(); + rawChip = RawChip(deleteButtonTooltipMessage: 'Delete Tooltip'); + rawChip.deleteButtonTooltipMessage; + + // Change made in https://github.com/flutter/flutter/pull/100381 + SelectionOverlay.fadeDuration; + + // Changes made in https://github.com/flutter/flutter/pull/105291 + ButtonStyle elevationButtonStyle = ElevatedButton.styleFrom( + foregroundColor: Colors.white, backgroundColor: Colors.blue, disabledForegroundColor: Colors.grey.withOpacity(0.38), disabledBackgroundColor: Colors.grey.withOpacity(0.12), + ); + ButtonStyle outlinedButtonStyle = OutlinedButton.styleFrom( + foregroundColor: Colors.blue, disabledForegroundColor: Colors.grey.withOpacity(0.38), + ); + ButtonStyle textButtonStyle = TextButton.styleFrom( + foregroundColor: Colors.blue, disabledForegroundColor: Colors.grey.withOpacity(0.38), + ); + + // Changes made in https://github.com/flutter/flutter/pull/78588 + final ScrollBehavior scrollBehavior = ScrollBehavior(); + scrollBehavior.buildOverscrollIndicator(context, child, axisDirection); + final MaterialScrollBehavior materialScrollBehavior = MaterialScrollBehavior(); + materialScrollBehavior.buildOverscrollIndicator(context, child, axisDirection); + + // Changes made in https://github.com/flutter/flutter/pull/111706 + Scrollbar scrollbar = Scrollbar(trackVisibility: true); + bool nowShowing = scrollbar.trackVisibility; + ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(trackVisibility: nowShowing); + scrollbarTheme.copyWith(trackVisibility: nowShowing); + scrollbarTheme.trackVisibility; +} diff --git a/packages/flutter/test_fixes/material/sliver_app_bar.dart b/packages/flutter/test_fixes/material/sliver_app_bar.dart new file mode 100644 index 000000000000..20ee87520020 --- /dev/null +++ b/packages/flutter/test_fixes/material/sliver_app_bar.dart @@ -0,0 +1,23 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/86198 + SliverAppBar sliverAppBar = SliverAppBar(); + sliverAppBar = SliverAppBar(brightness: Brightness.light); + sliverAppBar = SliverAppBar(brightness: Brightness.dark); + sliverAppBar = SliverAppBar(error: ''); + sliverAppBar.brightness; + + TextTheme myTextTheme = TextTheme(); + SliverAppBar sliverAppBar = SliverAppBar(); + sliverAppBar = SliverAppBar(textTheme: myTextTheme); + + SliverAppBar sliverAppBar = SliverAppBar(); + sliverAppBar = SliverAppBar(backwardsCompatibility: true); + sliverAppBar = SliverAppBar(backwardsCompatibility: false); + sliverAppBar.backwardsCompatibility; // Removing field reference not supported. +} diff --git a/packages/flutter/test_fixes/material/sliver_app_bar.dart.expect b/packages/flutter/test_fixes/material/sliver_app_bar.dart.expect new file mode 100644 index 000000000000..0c116f97a270 --- /dev/null +++ b/packages/flutter/test_fixes/material/sliver_app_bar.dart.expect @@ -0,0 +1,24 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/86198 + SliverAppBar sliverAppBar = SliverAppBar(); + sliverAppBar = SliverAppBar(systemOverlayStyle: SystemUiOverlayStyle.dark); + sliverAppBar = SliverAppBar(systemOverlayStyle: SystemUiOverlayStyle.light); + sliverAppBar = SliverAppBar(error: ''); + sliverAppBar.systemOverlayStyle; + + TextTheme myTextTheme = TextTheme(); + SliverAppBar sliverAppBar = SliverAppBar(); + sliverAppBar = SliverAppBar(toolbarTextStyle: myTextTheme.bodyMedium, titleTextStyle: myTextTheme.titleLarge); + + SliverAppBar sliverAppBar = SliverAppBar(); + sliverAppBar = SliverAppBar(); + sliverAppBar = SliverAppBar(); + sliverAppBar.backwardsCompatibility; // Removing field reference not supported. +} diff --git a/packages/flutter/test_fixes/material/text_theme.dart b/packages/flutter/test_fixes/material/text_theme.dart new file mode 100644 index 000000000000..73bc57e89892 --- /dev/null +++ b/packages/flutter/test_fixes/material/text_theme.dart @@ -0,0 +1,111 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/48547 + var TextTheme textTheme = TextTheme( + display4: displayStyle4, + display3: displayStyle3, + display2: displayStyle2, + display1: displayStyle1, + headline: headlineStyle, + title: titleStyle, + subhead: subheadStyle, + body2: body2Style, + body1: body1Style, + caption: captionStyle, + button: buttonStyle, + subtitle: subtitleStyle, + overline: overlineStyle, + ); + var TextTheme textTheme = TextTheme(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/48547 + var TextTheme copiedTextTheme = TextTheme.copyWith( + display4: displayStyle4, + display3: displayStyle3, + display2: displayStyle2, + display1: displayStyle1, + headline: headlineStyle, + title: titleStyle, + subhead: subheadStyle, + body2: body2Style, + body1: body1Style, + caption: captionStyle, + button: buttonStyle, + subtitle: subtitleStyle, + overline: overlineStyle, + ); + var TextTheme copiedTextTheme = TextTheme.copyWith(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/48547 + var style; + style = textTheme.display4; + style = textTheme.display3; + style = textTheme.display2; + style = textTheme.display1; + style = textTheme.headline; + style = textTheme.title; + style = textTheme.subhead; + style = textTheme.body2; + style = textTheme.body1; + style = textTheme.caption; + style = textTheme.button; + style = textTheme.subtitle; + style = textTheme.overline; + + // Changes made in https://github.com/flutter/flutter/pull/109817 + var TextTheme textTheme = TextTheme( + headline1: headline1Style, + headline2: headline2Style, + headline3: headline3Style, + headline4: headline4Style, + headline5: headline5Style, + headline6: headline6Style, + subtitle1: subtitle1Style, + subtitle2: subtitle2Style, + bodyText1: bodyText1Style, + bodyText2: bodyText2Style, + caption: captionStyle, + button: buttonStyle, + overline: overlineStyle, + ); + var TextTheme textTheme = TextTheme(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/109817 + var TextTheme copiedTextTheme = TextTheme.copyWith( + headline1: headline1Style, + headline2: headline2Style, + headline3: headline3Style, + headline4: headline4Style, + headline5: headline5Style, + headline6: headline6Style, + subtitle1: subtitle1Style, + subtitle2: subtitle2Style, + bodyText1: bodyText1Style, + bodyText2: bodyText2Style, + caption: captionStyle, + button: buttonStyle, + overline: overlineStyle, + ); + var TextTheme copiedTextTheme = TextTheme.copyWith(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/109817 + var style; + style = textTheme.headline1; + style = textTheme.headline2; + style = textTheme.headline3; + style = textTheme.headline4; + style = textTheme.headline5; + style = textTheme.headline6; + style = textTheme.subtitle1; + style = textTheme.subtitle2; + style = textTheme.bodyText1; + style = textTheme.bodyText2; + style = textTheme.caption; + style = textTheme.button; + style = textTheme.overline; +} diff --git a/packages/flutter/test_fixes/material/text_theme.dart.expect b/packages/flutter/test_fixes/material/text_theme.dart.expect new file mode 100644 index 000000000000..a33daecd8dbe --- /dev/null +++ b/packages/flutter/test_fixes/material/text_theme.dart.expect @@ -0,0 +1,111 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/48547 + var TextTheme textTheme = TextTheme( + displayLarge: displayStyle4, + displayMedium: displayStyle3, + displaySmall: displayStyle2, + headlineMedium: displayStyle1, + headlineSmall: headlineStyle, + titleLarge: titleStyle, + titleMedium: subheadStyle, + bodyLarge: body2Style, + bodyMedium: body1Style, + bodySmall: captionStyle, + labelLarge: buttonStyle, + titleSmall: subtitleStyle, + labelSmall: overlineStyle, + ); + var TextTheme textTheme = TextTheme(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/48547 + var TextTheme copiedTextTheme = TextTheme.copyWith( + displayLarge: displayStyle4, + displayMedium: displayStyle3, + displaySmall: displayStyle2, + headlineMedium: displayStyle1, + headlineSmall: headlineStyle, + titleLarge: titleStyle, + titleMedium: subheadStyle, + bodyLarge: body2Style, + bodyMedium: body1Style, + bodySmall: captionStyle, + labelLarge: buttonStyle, + titleSmall: subtitleStyle, + labelSmall: overlineStyle, + ); + var TextTheme copiedTextTheme = TextTheme.copyWith(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/48547 + var style; + style = textTheme.displayLarge; + style = textTheme.displayMedium; + style = textTheme.displaySmall; + style = textTheme.headlineMedium; + style = textTheme.headlineSmall; + style = textTheme.titleLarge; + style = textTheme.titleMedium; + style = textTheme.bodyLarge; + style = textTheme.bodyMedium; + style = textTheme.bodySmall; + style = textTheme.labelLarge; + style = textTheme.titleSmall; + style = textTheme.labelSmall; + + // Changes made in https://github.com/flutter/flutter/pull/109817 + var TextTheme textTheme = TextTheme( + displayLarge: headline1Style, + displayMedium: headline2Style, + displaySmall: headline3Style, + headlineMedium: headline4Style, + headlineSmall: headline5Style, + titleLarge: headline6Style, + titleMedium: subtitle1Style, + titleSmall: subtitle2Style, + bodyLarge: bodyText1Style, + bodyMedium: bodyText2Style, + bodySmall: captionStyle, + labelLarge: buttonStyle, + labelSmall: overlineStyle, + ); + var TextTheme textTheme = TextTheme(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/109817 + var TextTheme copiedTextTheme = TextTheme.copyWith( + displayLarge: headline1Style, + displayMedium: headline2Style, + displaySmall: headline3Style, + headlineMedium: headline4Style, + headlineSmall: headline5Style, + titleLarge: headline6Style, + titleMedium: subtitle1Style, + titleSmall: subtitle2Style, + bodyLarge: bodyText1Style, + bodyMedium: bodyText2Style, + bodySmall: captionStyle, + labelLarge: buttonStyle, + labelSmall: overlineStyle, + ); + var TextTheme copiedTextTheme = TextTheme.copyWith(error: ''); + + // Changes made in https://github.com/flutter/flutter/pull/109817 + var style; + style = textTheme.displayLarge; + style = textTheme.displayMedium; + style = textTheme.displaySmall; + style = textTheme.headlineMedium; + style = textTheme.headlineSmall; + style = textTheme.titleLarge; + style = textTheme.titleMedium; + style = textTheme.titleSmall; + style = textTheme.bodyLarge; + style = textTheme.bodyMedium; + style = textTheme.bodySmall; + style = textTheme.labelLarge; + style = textTheme.labelSmall; +} diff --git a/packages/flutter/test_fixes/material/theme_data.dart b/packages/flutter/test_fixes/material/theme_data.dart new file mode 100644 index 000000000000..7c4d4e50f85e --- /dev/null +++ b/packages/flutter/test_fixes/material/theme_data.dart @@ -0,0 +1,237 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/66482 + ThemeData(textSelectionColor: Colors.red); + ThemeData(cursorColor: Colors.blue); + ThemeData(textSelectionHandleColor: Colors.yellow); + ThemeData(useTextSelectionTheme: false); + ThemeData(textSelectionColor: Colors.red, useTextSelectionTheme: false); + ThemeData(cursorColor: Colors.blue, useTextSelectionTheme: false); + ThemeData( + textSelectionHandleColor: Colors.yellow, useTextSelectionTheme: false); + ThemeData( + textSelectionColor: Colors.red, + cursorColor: Colors.blue, + ); + ThemeData( + textSelectionHandleColor: Colors.yellow, + cursorColor: Colors.blue, + ); + ThemeData( + textSelectionColor: Colors.red, + textSelectionHandleColor: Colors.yellow, + ); + ThemeData( + textSelectionColor: Colors.red, + cursorColor: Colors.blue, + useTextSelectionTheme: false, + ); + ThemeData( + textSelectionHandleColor: Colors.yellow, + cursorColor: Colors.blue, + useTextSelectionTheme: true, + ); + ThemeData( + textSelectionColor: Colors.red, + textSelectionHandleColor: Colors.yellow, + useTextSelectionTheme: false, + ); + ThemeData( + textSelectionColor: Colors.red, + cursorColor: Colors.blue, + textSelectionHandleColor: Colors.yellow, + ); + ThemeData( + textSelectionColor: Colors.red, + cursorColor: Colors.blue, + textSelectionHandleColor: Colors.yellow, + useTextSelectionTheme: false, + ); + ThemeData(error: ''); + ThemeData.raw(error: ''); + ThemeData.raw(textSelectionColor: Colors.red); + ThemeData.raw(cursorColor: Colors.blue); + ThemeData.raw(textSelectionHandleColor: Colors.yellow); + ThemeData.raw(useTextSelectionTheme: false); + ThemeData.raw(textSelectionColor: Colors.red, useTextSelectionTheme: false); + ThemeData.raw(cursorColor: Colors.blue, useTextSelectionTheme: false); + ThemeData.raw( + textSelectionHandleColor: Colors.yellow, useTextSelectionTheme: false); + ThemeData.raw( + textSelectionColor: Colors.red, + cursorColor: Colors.blue, + ); + ThemeData.raw( + textSelectionHandleColor: Colors.yellow, + cursorColor: Colors.blue, + ); + ThemeData.raw( + textSelectionColor: Colors.red, + textSelectionHandleColor: Colors.yellow, + ); + ThemeData.raw( + textSelectionColor: Colors.red, + cursorColor: Colors.blue, + useTextSelectionTheme: false, + ); + ThemeData.raw( + textSelectionHandleColor: Colors.yellow, + cursorColor: Colors.blue, + useTextSelectionTheme: true, + ); + ThemeData.raw( + textSelectionColor: Colors.red, + textSelectionHandleColor: Colors.yellow, + useTextSelectionTheme: false, + ); + ThemeData.raw( + textSelectionColor: Colors.red, + cursorColor: Colors.blue, + textSelectionHandleColor: Colors.yellow, + ); + ThemeData.raw( + textSelectionColor: Colors.red, + cursorColor: Colors.blue, + textSelectionHandleColor: Colors.yellow, + useTextSelectionTheme: false, + ); + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(accentColor: Colors.red); + themeData = ThemeData(accentColor: Colors.red, primarySwatch: Colors.blue); + themeData = ThemeData(accentColor: Colors.red, colorScheme: ColorScheme.light()); + themeData = ThemeData(accentColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); + themeData = ThemeData(error: ''); + themeData = ThemeData.raw(accentColor: Colors.red); + themeData = ThemeData.raw(accentColor: Colors.red, primarySwatch: Colors.blue); + themeData = ThemeData.raw(accentColor: Colors.red, colorScheme: ColorScheme.light()); + themeData = ThemeData.raw(accentColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); + themeData = ThemeData.raw(error: ''); + themeData = themeData.copyWith(accentColor: Colors.red); + themeData = themeData.copyWith(error: ''); + themeData = themeData.copyWith(accentColor: Colors.red, primarySwatch: Colors.blue); + themeData = themeData.copyWith(accentColor: Colors.red, colorScheme: ColorScheme.light()); + themeData = themeData.copyWith(accentColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); + themeData.accentColor; + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(accentColorBrightness: Brightness.dark); + themeData = ThemeData.raw(accentColorBrightness: Brightness.dark); + themeData = themeData.copyWith(accentColorBrightness: Brightness.dark); + themeData.accentColorBrightness; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(accentTextTheme: TextTheme()); + themeData = ThemeData.raw(accentTextTheme: TextTheme()); + themeData = themeData.copyWith(accentTextTheme: TextTheme()); + themeData.accentTextTheme; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(accentIconTheme: IconThemeData()); + themeData = ThemeData.raw(accentIconTheme: IconThemeData()); + themeData = themeData.copyWith(accentIconTheme: IconThemeData()); + themeData.accentIconTheme; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(buttonColor: Colors.red); + themeData = ThemeData.raw(buttonColor: Colors.red); + themeData = themeData.copyWith(buttonColor: Colors.red); + themeData.buttonColor; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/87281 + ThemeData themeData = ThemeData(); + themeData = ThemeData(fixTextFieldOutlineLabel: true); + themeData = ThemeData.raw(fixTextFieldOutlineLabel: true); + themeData = themeData.copyWith(fixTextFieldOutlineLabel: true); + themeData.fixTextFieldOutlineLabel; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/93396 + ThemeData themeData = ThemeData(); + themeData = ThemeData(primaryColorBrightness: Brightness.dark); + themeData = ThemeData.raw(primaryColorBrightness: Brightness.dark); + themeData = themeData.copyWith(primaryColorBrightness: Brightness.dark); + themeData.primaryColorBrightness; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/97972 + ThemeData themeData = ThemeData(); + themeData = ThemeData(toggleableActiveColor: Colors.black); + themeData = ThemeData( + toggleableActiveColor: Colors.black, + ); + themeData = ThemeData.raw(toggleableActiveColor: Colors.black); + themeData = ThemeData.raw( + toggleableActiveColor: Colors.black, + ); + themeData = themeData.copyWith(toggleableActiveColor: Colors.black); + themeData = themeData.copyWith( + toggleableActiveColor: Colors.black, + ); + themeData.toggleableActiveColor; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/109070 + ThemeData themeData = ThemeData(); + themeData = ThemeData(selectedRowColor: Brightness.dark); + themeData = ThemeData.raw(selectedRowColor: Brightness.dark); + themeData = themeData.copyWith(selectedRowColor: Brightness.dark); + themeData.selectedRowColor; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/110162 + ThemeData themeData = ThemeData(); + themeData = ThemeData(errorColor: Colors.red); + themeData = ThemeData(errorColor: Colors.red, primarySwatch: Colors.blue); + themeData = ThemeData(errorColor: Colors.red, colorScheme: ColorScheme.light()); + themeData = ThemeData(errorColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); + themeData = ThemeData(otherParam: ''); + themeData = ThemeData.raw(errorColor: Colors.red); + themeData = ThemeData.raw(errorColor: Colors.red, primarySwatch: Colors.blue); + themeData = ThemeData.raw(errorColor: Colors.red, colorScheme: ColorScheme.light()); + themeData = ThemeData.raw(errorColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); + themeData = ThemeData.raw(otherParam: ''); + themeData = themeData.copyWith(errorColor: Colors.red); + themeData = themeData.copyWith(otherParam: ''); + themeData = themeData.copyWith(errorColor: Colors.red, primarySwatch: Colors.blue); + themeData = themeData.copyWith(errorColor: Colors.red, colorScheme: ColorScheme.light()); + themeData = themeData.copyWith(errorColor: Colors.red, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); + themeData.errorColor; + + // Changes made in https://github.com/flutter/flutter/pull/110162 + ThemeData themeData = ThemeData(); + themeData = ThemeData(backgroundColor: Colors.grey); + themeData = ThemeData(backgroundColor: Colors.grey, primarySwatch: Colors.blue); + themeData = ThemeData(backgroundColor: Colors.grey, colorScheme: ColorScheme.light()); + themeData = ThemeData(backgroundColor: Colors.grey, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); + themeData = ThemeData(otherParam: ''); + themeData = ThemeData.raw(backgroundColor: Colors.grey); + themeData = ThemeData.raw(backgroundColor: Colors.grey, primarySwatch: Colors.blue); + themeData = ThemeData.raw(backgroundColor: Colors.grey, colorScheme: ColorScheme.light()); + themeData = ThemeData.raw(backgroundColor: Colors.grey, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); + themeData = ThemeData.raw(otherParam: ''); + themeData = themeData.copyWith(backgroundColor: Colors.grey); + themeData = themeData.copyWith(otherParam: ''); + themeData = themeData.copyWith(backgroundColor: Colors.grey, primarySwatch: Colors.blue); + themeData = themeData.copyWith(backgroundColor: Colors.grey, colorScheme: ColorScheme.light()); + themeData = themeData.copyWith(backgroundColor: Colors.grey, colorScheme: ColorScheme.light(), primarySwatch: Colors.blue); + themeData.backgroundColor; + + // Changes made in https://github.com/flutter/flutter/pull/110162 + ThemeData themeData = ThemeData(); + themeData = ThemeData(backgroundColor: Colors.grey, errorColor: Colors.red); + themeData = ThemeData.raw(backgroundColor: Colors.grey, errorColor: Colors.red); + themeData = themeData.copyWith(backgroundColor: Colors.grey, errorColor: Colors.red); + + // Changes made in https://github.com/flutter/flutter/pull/111080 + ThemeData themeData = ThemeData(); + themeData = ThemeData(bottomAppBarColor: Colors.green); + themeData = ThemeData.raw(bottomAppBarColor: Colors.green); + themeData = ThemeData.copyWith(bottomAppBarColor: Colors.green); +} diff --git a/packages/flutter/test_fixes/material/theme_data.dart.expect b/packages/flutter/test_fixes/material/theme_data.dart.expect new file mode 100644 index 000000000000..0992a721fa38 --- /dev/null +++ b/packages/flutter/test_fixes/material/theme_data.dart.expect @@ -0,0 +1,443 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/66482 + ThemeData(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red)); + ThemeData(textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue)); + ThemeData(textSelectionTheme: TextSelectionThemeData(selectionHandleColor: Colors.yellow)); + ThemeData(); + ThemeData(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red)); + ThemeData(textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue)); + ThemeData( + textSelectionTheme: TextSelectionThemeData(selectionHandleColor: Colors.yellow)); + ThemeData( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red,), + ); + ThemeData( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionHandleColor: Colors.yellow,), + ); + ThemeData( + textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), + ); + ThemeData( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red,), + ); + ThemeData( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionHandleColor: Colors.yellow,), + ); + ThemeData( + textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), + ); + ThemeData( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), + ); + ThemeData( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), + ); + ThemeData(error: ''); + ThemeData.raw(error: ''); + ThemeData.raw(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red)); + ThemeData.raw(textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue)); + ThemeData.raw(textSelectionTheme: TextSelectionThemeData(selectionHandleColor: Colors.yellow)); + ThemeData.raw(); + ThemeData.raw(textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red)); + ThemeData.raw(textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue)); + ThemeData.raw( + textSelectionTheme: TextSelectionThemeData(selectionHandleColor: Colors.yellow)); + ThemeData.raw( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red,), + ); + ThemeData.raw( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionHandleColor: Colors.yellow,), + ); + ThemeData.raw( + textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), + ); + ThemeData.raw( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red,), + ); + ThemeData.raw( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionHandleColor: Colors.yellow,), + ); + ThemeData.raw( + textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), + ); + ThemeData.raw( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), + ); + ThemeData.raw( + textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), + ); + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red)); + themeData = ThemeData(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(secondary: Colors.red)); + themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(secondary: Colors.red)); + themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, secondary: Colors.red)); + themeData = ThemeData(error: ''); + themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red)); + themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(secondary: Colors.red)); + themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(secondary: Colors.red)); + themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, secondary: Colors.red)); + themeData = ThemeData.raw(error: ''); + themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red)); + themeData = themeData.copyWith(error: ''); + themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(secondary: Colors.red)); + themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(secondary: Colors.red)); + themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, secondary: Colors.red)); + themeData.colorScheme.secondary; + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(); + themeData = ThemeData.raw(); + themeData = themeData.copyWith(); + themeData.accentColorBrightness; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(); + themeData = ThemeData.raw(); + themeData = themeData.copyWith(); + themeData.accentTextTheme; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(); + themeData = ThemeData.raw(); + themeData = themeData.copyWith(); + themeData.accentIconTheme; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/81336 + ThemeData themeData = ThemeData(); + themeData = ThemeData(); + themeData = ThemeData.raw(); + themeData = themeData.copyWith(); + themeData.buttonColor; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/87281 + ThemeData themeData = ThemeData(); + themeData = ThemeData(); + themeData = ThemeData.raw(); + themeData = themeData.copyWith(); + themeData.fixTextFieldOutlineLabel; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/93396 + ThemeData themeData = ThemeData(); + themeData = ThemeData(); + themeData = ThemeData.raw(); + themeData = themeData.copyWith(); + themeData.primaryColorBrightness; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/97972 + ThemeData themeData = ThemeData(); + themeData = ThemeData(checkboxTheme: CheckboxThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), radioTheme: RadioThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + trackColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + )); + themeData = ThemeData( + checkboxTheme: CheckboxThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), radioTheme: RadioThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + trackColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), + ); + themeData = ThemeData.raw(checkboxTheme: CheckboxThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), radioTheme: RadioThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + trackColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + )); + themeData = ThemeData.raw( + checkboxTheme: CheckboxThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), radioTheme: RadioThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + trackColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), + ); + themeData = themeData.copyWith(checkboxTheme: CheckboxThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), radioTheme: RadioThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + trackColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + )); + themeData = themeData.copyWith( + checkboxTheme: CheckboxThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), radioTheme: RadioThemeData( + fillColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + trackColor: MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return Colors.black; + } + return null; + }), + ), + ); + themeData.toggleableActiveColor; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/109070 + ThemeData themeData = ThemeData(); + themeData = ThemeData(); + themeData = ThemeData.raw(); + themeData = themeData.copyWith(); + themeData.selectedRowColor; // Removing field reference not supported. + + // Changes made in https://github.com/flutter/flutter/pull/110162 + ThemeData themeData = ThemeData(); + themeData = ThemeData(colorScheme: ColorScheme(error: Colors.red)); + themeData = ThemeData(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(error: Colors.red)); + themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(error: Colors.red)); + themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, error: Colors.red)); + themeData = ThemeData(otherParam: ''); + themeData = ThemeData.raw(colorScheme: ColorScheme(error: Colors.red)); + themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(error: Colors.red)); + themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(error: Colors.red)); + themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, error: Colors.red)); + themeData = ThemeData.raw(otherParam: ''); + themeData = themeData.copyWith(colorScheme: ColorScheme(error: Colors.red)); + themeData = themeData.copyWith(otherParam: ''); + themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(error: Colors.red)); + themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(error: Colors.red)); + themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, error: Colors.red)); + themeData.colorScheme.error; + + // Changes made in https://github.com/flutter/flutter/pull/110162 + ThemeData themeData = ThemeData(); + themeData = ThemeData(colorScheme: ColorScheme(background: Colors.grey)); + themeData = ThemeData(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(background: Colors.grey)); + themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(background: Colors.grey)); + themeData = ThemeData(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, background: Colors.grey)); + themeData = ThemeData(otherParam: ''); + themeData = ThemeData.raw(colorScheme: ColorScheme(background: Colors.grey)); + themeData = ThemeData.raw(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(background: Colors.grey)); + themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(background: Colors.grey)); + themeData = ThemeData.raw(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, background: Colors.grey)); + themeData = ThemeData.raw(otherParam: ''); + themeData = themeData.copyWith(colorScheme: ColorScheme(background: Colors.grey)); + themeData = themeData.copyWith(otherParam: ''); + themeData = themeData.copyWith(colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue).copyWith(background: Colors.grey)); + themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(background: Colors.grey)); + themeData = themeData.copyWith(colorScheme: ColorScheme.light().copyWith(primarySwatch: Colors.blue, background: Colors.grey)); + themeData.colorScheme.background; + + // Changes made in https://github.com/flutter/flutter/pull/110162 + ThemeData themeData = ThemeData(); + themeData = ThemeData(colorScheme: ColorScheme(background: Colors.grey).copyWith(error: Colors.red)); + themeData = ThemeData.raw(colorScheme: ColorScheme(background: Colors.grey).copyWith(error: Colors.red)); + themeData = themeData.copyWith(colorScheme: ColorScheme(background: Colors.grey).copyWith(error: Colors.red)); + + // Changes made in https://github.com/flutter/flutter/pull/111080 + ThemeData themeData = ThemeData(); + themeData = ThemeData(bottomAppBarTheme: BottomAppBarTheme(color: Colors.green)); + themeData = ThemeData.raw(bottomAppBarTheme: BottomAppBarTheme(color: Colors.green)); + themeData = ThemeData.copyWith(bottomAppBarTheme: BottomAppBarTheme(color: Colors.green)); +} diff --git a/packages/flutter/test_fixes/rendering.dart b/packages/flutter/test_fixes/rendering/rendering.dart similarity index 100% rename from packages/flutter/test_fixes/rendering.dart rename to packages/flutter/test_fixes/rendering/rendering.dart diff --git a/packages/flutter/test_fixes/rendering.dart.expect b/packages/flutter/test_fixes/rendering/rendering.dart.expect similarity index 100% rename from packages/flutter/test_fixes/rendering.dart.expect rename to packages/flutter/test_fixes/rendering/rendering.dart.expect diff --git a/packages/flutter/test_fixes/services.dart b/packages/flutter/test_fixes/services/services.dart similarity index 100% rename from packages/flutter/test_fixes/services.dart rename to packages/flutter/test_fixes/services/services.dart diff --git a/packages/flutter/test_fixes/services.dart.expect b/packages/flutter/test_fixes/services/services.dart.expect similarity index 100% rename from packages/flutter/test_fixes/services.dart.expect rename to packages/flutter/test_fixes/services/services.dart.expect diff --git a/packages/flutter/test_fixes/widgets/actions.dart b/packages/flutter/test_fixes/widgets/actions.dart new file mode 100644 index 000000000000..9cf78c29fd54 --- /dev/null +++ b/packages/flutter/test_fixes/widgets/actions.dart @@ -0,0 +1,18 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/widgets.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/68921 + Actions.find(error: ''); + Actions.find(context, nullOk: true); + Actions.find(context, nullOk: false); + Actions.handler(context, nullOk: true); + Actions.handler(context, nullOk: false); + Actions.handler(error: ''); + Actions.invoke(error: ''); + Actions.invoke(context, nullOk: true); + Actions.invoke(context, nullOk: false); +} diff --git a/packages/flutter/test_fixes/widgets/actions.dart.expect b/packages/flutter/test_fixes/widgets/actions.dart.expect new file mode 100644 index 000000000000..4edf38310772 --- /dev/null +++ b/packages/flutter/test_fixes/widgets/actions.dart.expect @@ -0,0 +1,18 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/widgets.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/68921 + Actions.find(error: ''); + Actions.maybeFind(context); + Actions.find(context); + Actions.handler(context); + Actions.handler(context); + Actions.handler(error: ''); + Actions.invoke(error: ''); + Actions.maybeInvoke(context); + Actions.invoke(context); +} diff --git a/packages/flutter/test_fixes/widgets/build_context.dart b/packages/flutter/test_fixes/widgets/build_context.dart new file mode 100644 index 000000000000..178536eb74a3 --- /dev/null +++ b/packages/flutter/test_fixes/widgets/build_context.dart @@ -0,0 +1,17 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/widgets.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/44189 + const BuildContext buildContext = Element(myWidget); + buildContext.inheritFromElement(ancestor); + buildContext.inheritFromWidgetOfExactType(targetType); + buildContext.ancestorInheritedElementForWidgetOfExactType(targetType); + buildContext.ancestorWidgetOfExactType(targetType); + buildContext.ancestorStateOfType(TypeMatcher()); + buildContext.rootAncestorStateOfType(TypeMatcher()); + buildContext.ancestorRenderObjectOfType(TypeMatcher()); +} diff --git a/packages/flutter/test_fixes/widgets/build_context.dart.expect b/packages/flutter/test_fixes/widgets/build_context.dart.expect new file mode 100644 index 000000000000..22128150bfd8 --- /dev/null +++ b/packages/flutter/test_fixes/widgets/build_context.dart.expect @@ -0,0 +1,17 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/widgets.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/44189 + const BuildContext buildContext = Element(myWidget); + buildContext.dependOnInheritedElement(ancestor); + buildContext.dependOnInheritedWidgetOfExactType(); + buildContext.getElementForInheritedWidgetOfExactType(); + buildContext.findAncestorWidgetOfExactType(); + buildContext.findAncestorStateOfType(); + buildContext.findRootAncestorStateOfType(); + buildContext.findAncestorRenderObjectOfType(); +} diff --git a/packages/flutter/test_fixes/widgets/element.dart b/packages/flutter/test_fixes/widgets/element.dart new file mode 100644 index 000000000000..562e80fe2809 --- /dev/null +++ b/packages/flutter/test_fixes/widgets/element.dart @@ -0,0 +1,17 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/widgets.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/44189 + const Element element = Element(myWidget); + element.inheritFromElement(ancestor); + element.inheritFromWidgetOfExactType(targetType); + element.ancestorInheritedElementForWidgetOfExactType(targetType); + element.ancestorWidgetOfExactType(targetType); + element.ancestorStateOfType(TypeMatcher()); + element.rootAncestorStateOfType(TypeMatcher()); + element.ancestorRenderObjectOfType(TypeMatcher()); +} diff --git a/packages/flutter/test_fixes/widgets/element.dart.expect b/packages/flutter/test_fixes/widgets/element.dart.expect new file mode 100644 index 000000000000..4212c21d4ac2 --- /dev/null +++ b/packages/flutter/test_fixes/widgets/element.dart.expect @@ -0,0 +1,17 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/widgets.dart'; + +void main() { + // Changes made in https://github.com/flutter/flutter/pull/44189 + const Element element = Element(myWidget); + element.dependOnInheritedElement(ancestor); + element.dependOnInheritedWidgetOfExactType(); + element.getElementForInheritedWidgetOfExactType(); + element.findAncestorWidgetOfExactType(); + element.findAncestorStateOfType(); + element.findRootAncestorStateOfType(); + element.findAncestorRenderObjectOfType(); +} diff --git a/packages/flutter/test_fixes/widgets/list_wheel_scroll_view.dart b/packages/flutter/test_fixes/widgets/list_wheel_scroll_view.dart new file mode 100644 index 000000000000..77592a29669f --- /dev/null +++ b/packages/flutter/test_fixes/widgets/list_wheel_scroll_view.dart @@ -0,0 +1,18 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/widgets.dart'; + +void main() { + // Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + ListWheelScrollView listWheelScrollView = ListWheelScrollView(); + listWheelScrollView = ListWheelScrollView(clipToSize: true); + listWheelScrollView = ListWheelScrollView(clipToSize: false); + listWheelScrollView = ListWheelScrollView(error: ''); + listWheelScrollView = ListWheelScrollView.useDelegate(); + listWheelScrollView = ListWheelScrollView.useDelegate(clipToSize: true); + listWheelScrollView = ListWheelScrollView.useDelegate(clipToSize: false); + listWheelScrollView = ListWheelScrollView.useDelegate(error: ''); + listWheelScrollView.clipToSize; +} diff --git a/packages/flutter/test_fixes/widgets/list_wheel_scroll_view.dart.expect b/packages/flutter/test_fixes/widgets/list_wheel_scroll_view.dart.expect new file mode 100644 index 000000000000..b893ffc002cc --- /dev/null +++ b/packages/flutter/test_fixes/widgets/list_wheel_scroll_view.dart.expect @@ -0,0 +1,18 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/widgets.dart'; + +void main() { + // Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior + ListWheelScrollView listWheelScrollView = ListWheelScrollView(); + listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.hardEdge); + listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.none); + listWheelScrollView = ListWheelScrollView(error: ''); + listWheelScrollView = ListWheelScrollView.useDelegate(); + listWheelScrollView = ListWheelScrollView.useDelegate(clipBehavior: Clip.hardEdge); + listWheelScrollView = ListWheelScrollView.useDelegate(clipBehavior: Clip.none); + listWheelScrollView = ListWheelScrollView.useDelegate(error: ''); + listWheelScrollView.clipBehavior; +} diff --git a/packages/flutter/test_fixes/widgets.dart b/packages/flutter/test_fixes/widgets/widgets.dart similarity index 78% rename from packages/flutter/test_fixes/widgets.dart rename to packages/flutter/test_fixes/widgets/widgets.dart index 0ef820ac774e..b3f777b086e1 100644 --- a/packages/flutter/test_fixes/widgets.dart +++ b/packages/flutter/test_fixes/widgets/widgets.dart @@ -11,16 +11,6 @@ void main() { RenderObject renderObject; Object object; - // Changes made in https://github.com/flutter/flutter/pull/44189 - const Element element = Element(myWidget); - element.inheritFromElement(ancestor); - element.inheritFromWidgetOfExactType(targetType); - element.ancestorInheritedElementForWidgetOfExactType(targetType); - element.ancestorWidgetOfExactType(targetType); - element.ancestorStateOfType(TypeMatcher()); - element.rootAncestorStateOfType(TypeMatcher()); - element.ancestorRenderObjectOfType(TypeMatcher()); - // Changes made in https://github.com/flutter/flutter/pull/45941 and https://github.com/flutter/flutter/pull/83843 final WidgetsBinding binding = WidgetsBinding.instance; binding.deferFirstFrameReport(); @@ -30,16 +20,6 @@ void main() { const StatefulElement statefulElement = StatefulElement(myWidget); statefulElement.inheritFromElement(ancestor); - // Changes made in https://github.com/flutter/flutter/pull/44189 - const BuildContext buildContext = Element(myWidget); - buildContext.inheritFromElement(ancestor); - buildContext.inheritFromWidgetOfExactType(targetType); - buildContext.ancestorInheritedElementForWidgetOfExactType(targetType); - buildContext.ancestorWidgetOfExactType(targetType); - buildContext.ancestorStateOfType(TypeMatcher()); - buildContext.rootAncestorStateOfType(TypeMatcher()); - buildContext.ancestorRenderObjectOfType(TypeMatcher()); - // Changes made in https://github.com/flutter/flutter/pull/61648 const Form form = Form(autovalidate: true); const Form form = Form(autovalidate: false); @@ -93,15 +73,6 @@ void main() { Shortcuts.of(context, nullOk: true); Shortcuts.of(context, nullOk: false); Shortcuts.of(error: ''); - Actions.find(error: ''); - Actions.find(context, nullOk: true); - Actions.find(context, nullOk: false); - Actions.handler(context, nullOk: true); - Actions.handler(context, nullOk: false); - Actions.handler(error: ''); - Actions.invoke(error: ''); - Actions.invoke(context, nullOk: true); - Actions.invoke(context, nullOk: false); // Changes made in https://github.com/flutter/flutter/pull/68925 AnimatedList.of(context, nullOk: true); @@ -158,15 +129,6 @@ void main() { renderObjectToWidgetElement.removeChildRenderObject(renderObject); // Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - ListWheelScrollView listWheelScrollView = ListWheelScrollView(); - listWheelScrollView = ListWheelScrollView(clipToSize: true); - listWheelScrollView = ListWheelScrollView(clipToSize: false); - listWheelScrollView = ListWheelScrollView(error: ''); - listWheelScrollView = ListWheelScrollView.useDelegate(); - listWheelScrollView = ListWheelScrollView.useDelegate(clipToSize: true); - listWheelScrollView = ListWheelScrollView.useDelegate(clipToSize: false); - listWheelScrollView = ListWheelScrollView.useDelegate(error: ''); - listWheelScrollView.clipToSize; ListWheelViewport listWheelViewport = ListWheelViewport(); listWheelViewport = ListWheelViewport(clipToSize: true); listWheelViewport = ListWheelViewport(clipToSize: false); diff --git a/packages/flutter/test_fixes/widgets.dart.expect b/packages/flutter/test_fixes/widgets/widgets.dart.expect similarity index 79% rename from packages/flutter/test_fixes/widgets.dart.expect rename to packages/flutter/test_fixes/widgets/widgets.dart.expect index 4be0c8040e90..79255c646515 100644 --- a/packages/flutter/test_fixes/widgets.dart.expect +++ b/packages/flutter/test_fixes/widgets/widgets.dart.expect @@ -11,16 +11,6 @@ void main() { RenderObject renderObject; Object object; - // Changes made in https://github.com/flutter/flutter/pull/44189 - const Element element = Element(myWidget); - element.dependOnInheritedElement(ancestor); - element.dependOnInheritedWidgetOfExactType(); - element.getElementForInheritedWidgetOfExactType(); - element.findAncestorWidgetOfExactType(); - element.findAncestorStateOfType(); - element.findRootAncestorStateOfType(); - element.findAncestorRenderObjectOfType(); - // Changes made in https://github.com/flutter/flutter/pull/45941 and https://github.com/flutter/flutter/pull/83843 final WidgetsBinding binding = WidgetsBinding.instance; binding.deferFirstFrame(); @@ -30,16 +20,6 @@ void main() { const StatefulElement statefulElement = StatefulElement(myWidget); statefulElement.dependOnInheritedElement(ancestor); - // Changes made in https://github.com/flutter/flutter/pull/44189 - const BuildContext buildContext = Element(myWidget); - buildContext.dependOnInheritedElement(ancestor); - buildContext.dependOnInheritedWidgetOfExactType(); - buildContext.getElementForInheritedWidgetOfExactType(); - buildContext.findAncestorWidgetOfExactType(); - buildContext.findAncestorStateOfType(); - buildContext.findRootAncestorStateOfType(); - buildContext.findAncestorRenderObjectOfType(); - // Changes made in https://github.com/flutter/flutter/pull/61648 const Form form = Form(autovalidateMode: AutovalidateMode.always); const Form form = Form(autovalidateMode: AutovalidateMode.disabled); @@ -93,15 +73,6 @@ void main() { Shortcuts.maybeOf(context); Shortcuts.of(context); Shortcuts.of(error: ''); - Actions.find(error: ''); - Actions.maybeFind(context); - Actions.find(context); - Actions.handler(context); - Actions.handler(context); - Actions.handler(error: ''); - Actions.invoke(error: ''); - Actions.maybeInvoke(context); - Actions.invoke(context); // Changes made in https://github.com/flutter/flutter/pull/68925 AnimatedList.maybeOf(context); @@ -158,15 +129,6 @@ void main() { renderObjectToWidgetElement.removeRenderObjectChild(renderObject); // Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior - ListWheelScrollView listWheelScrollView = ListWheelScrollView(); - listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.hardEdge); - listWheelScrollView = ListWheelScrollView(clipBehavior: Clip.none); - listWheelScrollView = ListWheelScrollView(error: ''); - listWheelScrollView = ListWheelScrollView.useDelegate(); - listWheelScrollView = ListWheelScrollView.useDelegate(clipBehavior: Clip.hardEdge); - listWheelScrollView = ListWheelScrollView.useDelegate(clipBehavior: Clip.none); - listWheelScrollView = ListWheelScrollView.useDelegate(error: ''); - listWheelScrollView.clipBehavior; ListWheelViewport listWheelViewport = ListWheelViewport(); listWheelViewport = ListWheelViewport(clipBehavior: Clip.hardEdge); listWheelViewport = ListWheelViewport(clipBehavior: Clip.none);