Unverified Commit a1432a9c authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

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: 's avatarAlexander Dahlberg <dustbin4ever@gmail.com>

* Fix copy paste errors
Co-authored-by: 's avatarAlexander Dahlberg <dustbin4ever@gmail.com>
parent 53e68762
## 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.
# 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.
This diff is collapsed.
# 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.
# 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.
# 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.
This diff is collapsed.
# 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.
This diff is collapsed.
# 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.
# 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.
# 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 <XXX> library. *
# Uncomment version & transforms, and follow with fixes.
# version: 1
# transforms:
# Before adding a new fix: read instructions at the top of this file.
# 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.
# 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.
# 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.
# 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.
This diff is collapsed.
## Directory contents ## Directory contents
The Dart files and golden master `.expect` files in this directory are used to 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 See the flutter/packages/flutter/lib/fix_data directory for the current
data driven fixes. package:flutter data-driven fixes.
To run these tests locally, execute this command in the flutter/packages/flutter/test_fixes To run these tests locally, execute this command in the
directory. flutter/packages/flutter/test_fixes directory.
```sh ```sh
dart fix --compare-to-golden 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 ## When making structural changes to this directory
Note that the tests in this directory are also invoked from external repositories. Note that the tests in this directory are also invoked from external
Specifically, the CI system for the dart-lang/sdk repo runs these tests in order to repositories. Specifically, the CI system for the dart-lang/sdk repo runs these
ensure that changes to the dart fix file format do not break Flutter. 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) 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. for where the tests are invoked.
......
// 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.
}
// 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.
}
// 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;
}
// 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;
}
// 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;
}
// 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;
}
This diff is collapsed.
// 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.
}
// 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.
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// 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);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment