pushy / pushy-flutter

The official Pushy SDK for Flutter apps.
Apache License 2.0
21 stars 19 forks source link

Null safety. #29

Closed ryanheise closed 3 years ago

ryanheise commented 3 years ago

Migrates the plugin and example to null safety.

pushy commented 3 years ago

Hi @ryanheise, Thanks so much for your work on this! 💯

A few questions:

1) Does this new version break backwards compatibility? We noticed you bumped the major version of pushy_flutter to 2.0.0.

2) Does this break compatibility with older Flutter versions for those who haven't upgraded to Null safety (Flutter 2) yet?

ryanheise commented 3 years ago

All nullsafe releases are classified as breaking changes as per Dart's null safety migration guide.

Developers who are pinned to older Flutter versions will still be able to use the old version of this plugin, and this would not be a unique situation for pushy_flutter given that it is very likely that the majority of other dependencies in any app's pubspec will have nullsafe versions by now, and the app developer would therefore pin their pushy_flutter dependency to an old version in the same way that they would now need to also pin most of their other dependencies to old plugin versions, until they are able to migrate to Flutter 2.

On the other hand, developers who upgrade their SDK to Flutter 2 but have not yet migrated their code to nullsafety, or have dependencies that have not yet been migrate to null safety, will still be able to use the new nullsafety version of this plugin, since the new Dart compiler in Flutter 2 will switch to a mixed mode where old unmigrated code can still run alongside new nullsafe code.

pushy commented 3 years ago

Thanks for the detailed explanation @ryanheise and for your work on this! 💯

Merged and published to pub.dev as 2.0.0.