Notice for developers using Flutter 3.24+ #239
fujidaiti
announced in
Announcements
Replies: 1 comment 1 reply
-
You might have a look at the condition imports in dart: This way you could have two different files that use different api methods that depend on the flutter version or the availability of the method |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If your project uses Flutter 3.24.0 or later, we recommend using the pre-release versions named
1.0.0-f324.x.x.x
. While you can still use the non-pre-release versions (e.g.,0.9.4
) with Flutter 3.24+, you may encounter issues related to thePopScope
widget due to a breaking change in Flutter 3.24. There are no functional or API differences between the pre-release and non-pre-release versions, except that the pre-release versions require Flutter 3.24.0 or later.Background
This package previously used the
Route.onPopInvoked
method to invokePopScope.onPopInvoked
callbacks when users performed a swipe-to-dismiss gesture. However, these methods were deprecated in Flutter 3.24.0 as part of a breaking change related to thePopScope
widget. The problem is thatModalRoute.onPopInvoked
, which was an override ofRoute.onPopInvoked
and wherePopScope.onPopInvoked
callbacks were actually invoked, was removed. As a result, thePopScope.onPopInvoked
callback is no longer invoked in Flutter 3.24+. These changes led to issues such as #233.The only possible solution was to replace
Route.onPopInvoked
withRoute.onPopInvokedWithResult
, which was introduced in Flutter 3.24.0. However, migrating to the new API would require increasing the lower bound of the SDK constraint to 3.24.0. For those using an SDK version lower than 3.24, this change would be a significant breaking change. Ultimately, we decided to publish different versions for different SDK constraints to maintain backward compatibility.Beta Was this translation helpful? Give feedback.
All reactions