Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new replacedBy dart fix for current and prior deprecations #95284

Open
Piinks opened this issue Dec 14, 2021 · 2 comments
Open

Implement new replacedBy dart fix for current and prior deprecations #95284

Piinks opened this issue Dec 14, 2021 · 2 comments
Labels
c: tech-debt Technical debt, code quality, testing, etc. dependency: dart Dart team may need to help us framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team Infra upgrades, team productivity, code health, technical debt. See also team: labels. team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@Piinks
Copy link
Contributor

Piinks commented Dec 14, 2021

The dart fix has a new feature, replacedBy. This allows us to make transformations across classes.
The feature resolved dart-lang/sdk#45393, which has some example use cases.

We should implement this for current deprecations, and check to see if any past deprecations that have already been removed can be supplied a fix.

⭐ It has not been confirmed that we can provide fixes for these, but they should each be investigated. Some may still be too complex to reliably migrate, or may not provide a better experience to the developer if it can only partially be fixed.

Might be able to fix, will check them off as they are investigated:

Old API New API
DayPicker CalendarDatePicker
MonthPicker CalendarDatePicker
FlatButton TextButton
OutlineButton OutlinedButton
RaisedButton ElevatedButton
Scaffold.[snackbars] ScaffoldMessenger.[snackbars]
BlacklistingTextInputFormatter FilteringTextInputFormatter
WhitelistingTextInputFormatter FilteringTextInputFormatter
CupertinoNavigationBar.actionsForegroundColor CupertinoTheme.primaryColor
CupertinoSliverNavigationBar.actionsForegroundColor CupertinoTheme.primaryColor
ButtonTheme.bar ButtonBarTheme

These are just the ones I thought of or saw might be possible from the ones we have announced. If anyone can think of others, let us know and we'll add them to the list!

@Piinks Piinks added team Infra upgrades, team productivity, code health, technical debt. See also team: labels. framework flutter/packages/flutter repository. See also f: labels. dependency: dart Dart team may need to help us P2 Important issues not at the top of the work list c: tech-debt Technical debt, code quality, testing, etc. labels Dec 14, 2021
@Piinks Piinks self-assigned this Dec 14, 2021
@Piinks Piinks added P3 Issues that are less important to the Flutter project and removed P2 Important issues not at the top of the work list labels Feb 2, 2022
@Piinks
Copy link
Contributor Author

Piinks commented May 26, 2022

The button and Month/Date picker migrations were not possible with replacedBy, they were still too complex to create a transformation of code that would actually be helpful to the user.
I feel the SnackBar one is similar, since many folks save a reference, use a key, or chain off of .of(context) to use that API. I don't think dart fix can reliably catch these, but it is still worth checking.

The remaining ones to explore are listed above. I am not currently working on this, so I am going to un-assign myself.

@TahaTesser has been exploring fixes, do not feel obligated to work on this. Just an FYI in case you are interested as part of your fix library. :)

@Piinks Piinks removed their assignment May 26, 2022
@flutter-triage-bot flutter-triage-bot bot added team-framework Owned by Framework team triaged-framework Triaged by Framework team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: tech-debt Technical debt, code quality, testing, etc. dependency: dart Dart team may need to help us framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team Infra upgrades, team productivity, code health, technical debt. See also team: labels. team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
None yet
Development

No branches or pull requests

1 participant