rrousselGit / flutter_hooks

React hooks for Flutter. Hooks are a new kind of object that manages a Widget life-cycles. They are used to increase code sharing between widgets and as a complete replacement for StatefulWidget.
MIT License
3.06k stars 175 forks source link

Upgrade to Flutter 3.7.0 and Dart 2.19 #411

Closed Reprevise closed 5 months ago

Reprevise commented 5 months ago

Prerequisite to deprecate the useIsMounted hook which will be done in a separate PR so this is kept clean to resolve any issues there are during upgrading. I updated the changelog as well, and all tests are passing.

rrousselGit commented 5 months ago

I don't think that's necessary. We could deprecate the hook without bumping minimum Flutter

Reprevise commented 5 months ago

@rrousselGit BuildContext.mounted was released in 3.7.0 so if we don't bump the min then users who are under that version will have no alternative.

rrousselGit commented 5 months ago

That doesn't matter.

Reprevise commented 5 months ago

I'm confused as to why it doesn't matter. This hook should only be deprecated when users have a valid alternative. To ensure that they do, we need to bump the minimum flutter version so users who are below it can't upgrade to the new version of the package.

rrousselGit commented 5 months ago

The hook is deprecated regardless of whether people use Flutter 3.7.0 or not. The only thing this would do is prevent folks using an out of date SDK from knowing that they use a deprecated API.