Support Flutter 3.41 - #142
Open
yusufkecer wants to merge 1 commit into
Open
Conversation
Flutter 3.41 added an `isAntiAlias` field to `Container`. `$Container` implements `Container` and did not implement it, so the class is abstract by omission and the package does not compile at all on 3.41 or later: Error: The non-abstract class '$Container' is missing implementations for these members: - Container.isAntiAlias This forwards it like every other Container property. Because `Container.isAntiAlias` does not exist before 3.41, the forwarder cannot compile on older Flutter either, so the minimum Flutter version moves to 3.41.0. Anyone on 3.19-3.40 keeps resolving to 0.8.2, which works there. The dart_eval constraint moves to ^0.8.5 to match: Flutter 3.41 ships a Dart newer than dart_eval supported before 0.8.3, so the versions this release can actually run with start there. With this, `flutter analyze lib` reports no errors and all 16 tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
flutter_eval 0.8.2 does not compile on Flutter 3.41 or later. Not a warning — the package fails to build, and so does anything that depends on it, including its own test suite:
Containergained anisAntiAliasfield in 3.41.$Container implements Containerand did not implement it, which makes the class abstract by omission.Changes
$ContainerforwardsisAntiAlias, the same way it forwardsclipBehaviorand the rest.Container.isAntiAliasdoes not exist before 3.41, so the forwarder cannot compile on older versions. I checked 3.19, 3.27, 3.32, 3.35, 3.38, 3.39 and 3.40 — the field first appears in 3.41.0. Anyone on an older Flutter keeps resolving to 0.8.2, which still works for them.^0.8.1if you would rather keep the constraint loose.CHANGELOGentry and version bump to 0.8.3. Also happy to drop those if you prefer to handle releases yourself.Verification
flutter analyze libreports no errors, and all 16 tests intest/flutter_eval_test.dartpass, on Flutter 3.44.8 stable.Not included
Three things current Flutter also complains about, left out to keep this reviewable — happy to open separate PRs:
lib/src/cupertino/colors.dartforwardsColor.value,.red,.green,.blue,.alpha,.opacityandwithOpacity, all deprecated after 3.33. The exposed API should keep those names, so the fix is to change the internals only.lib/src/widgets/scroll_view.dartusescacheExtent, deprecated after 3.41 in favour ofscrollCacheExtent.lib/src/widgets/icon_data.dartconstructsIconDatafrom runtime arguments, which now warns because Flutter wants those const for icon tree-shaking. Not fixable in a library that builds icons dynamically; it probably wants an ignore and a note that apps should build with--no-tree-shake-icons.