Skip to content

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Sep 16, 2022

WIP - tests still need to be migrated

This removes RenderUnconstrainedBox

This deprecated class has reached end of life after the release of Flutter 3.3

Part of #111708
For the full list of deprecations being removed in this batch, see flutter.dev/go/deprecations-removed-after-3-3

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@Piinks Piinks added c: contributor-productivity Team-specific productivity, code health, technical debt. c: tech-debt Technical debt, code quality, testing, etc. labels Sep 16, 2022
@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Sep 16, 2022
@Piinks Piinks added the c: API break Backwards-incompatible API changes label Sep 16, 2022
@Piinks
Copy link
Contributor Author

Piinks commented Sep 16, 2022

@LongCatIsLooong can you advise what the migration is for this deprecation? There is no guide at https://docs.flutter.dev/release/breaking-changes. I'd like to see if I can add a dart fix for this.

There are a bunch of tests in box_test.dart that need to be migrated or removed, I am not sure which.

@LongCatIsLooong
Copy link
Contributor

LongCatIsLooong commented Sep 16, 2022

I think

  • RenderUnconstrainedBox(constrainedAxis: Axis.vertical) is equivalent to
  • RenderConstraintsTransformBox(constraintsTransform: ConstraintsTransformBox.heightConstrained), and
  • RenderUnconstrainedBox(constrainedAxis: Axis.horizontal) is equivalent to
  • RenderConstraintsTransformBox(constraintsTransform: ConstraintsTransformBox.widthConstrained). Other parameters are pretty much 1:1.

@Piinks
Copy link
Contributor Author

Piinks commented Sep 16, 2022

Oh fabulous, thank you! I think I can write an auto-fix for it then.

@LongCatIsLooong
Copy link
Contributor

The widget using the deprecated render object at the time (UnconstrainedBox) has already been migrated to RenderConstraintsTransformBox

@Piinks
Copy link
Contributor Author

Piinks commented Sep 20, 2022

Unfortunately the dart fix did not work as expected, filed dart-lang/sdk#50011 to track and follow up. I think this can move ahead, and I will include the expected transforms in the migration guide.

@Piinks Piinks changed the title WIP - Remove Deprecated RenderUnconstrainedBox Remove Deprecated RenderUnconstrainedBox Sep 20, 2022
@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 20, 2022
@auto-submit auto-submit bot merged commit 30c2d77 into flutter:master Sep 20, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 20, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App c: API break Backwards-incompatible API changes c: contributor-productivity Team-specific productivity, code health, technical debt. c: tech-debt Technical debt, code quality, testing, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants