This is a request to add support for _null safety_ to package:getx.
This is a second most like package, so would be great to have null safety enabled early.
@jonataslaw Do you have any plans on tackling this? Need help?
(it's the only dependency in my project that keep me from achieving sound null safety 馃槈)
I am thinking of using this lib for my app. Could you please give a vision of null-safety version so I can make a decision.
Currently, I tried with the counter example and see that Rx always allow null. It means we cannot have wrapper for non-nullable variable at all right now.
I'm fixing this so that everyone knows.
GetX 4.0 is coming along with the null-safety version.
Migrating to null-safety is improving even more the performance of GetX which is already very good, but we will go through some break changes (as well as any Flutter project that is migrated to null-safety), and for that we will launch a new version .
This new version will be very stable (any errors that may occur due to users' fault, or bad coding, will be eliminated in the new version).
GetX has not gone through many breakings changes since its creation. It is still in version 3, while many popular Flutter packages are already in version 5/6/7. However, I believe it is time to make small changes that will make GetX much more stable, not that it is not now, but that can cause structural problems.
I intend to launch an automation tool, which will convert your code from version 3 to version 4, so that our users undergo a painless modification.
The code that will be changed will be basically the navigation part.
GetX's state management is very stable and has received virtually no issues in recent months. Adding a ".obs" and wrapping the widget that will be changed to an "Obx (() =>)" just works. This is something simple, which works perfectly in any situation. There will not be many substantial changes in state management. In fact we are working to have no or almost no change in the break in the state management. However, we realize that all open issues are related to dependency injection and route management or internationalization.
Thinking about it, it's time to balance this, and make the whole framework even more harmonious, and for that it will be necessary to make small changes mainly in unnamed routes.
We are running tests with Navigator 2.0 and it will probably include the new version.
Currently on Flutter, Dialogs, Snackbars, BottomSheets are ROUTES.
And we are also studying to create a standalone api from Flutter based on overlay. This is not 100% sure, and we will still consult the community to make sure this is a change the community wants.
Is there an ETA on this?
This is in no way an ask to rush this, just wondering for my own planification.
Thank you!
I can see the null-safety branch. I'd love to help out (last commit is from mid december). But do you have any plan, strategy or overview on what still needs to be done?
I am also eagerly waiting for this update...
I am also eagerly waiting for this update...
I just started with 1 package: get_utils. Check out the PR: https://github.com/jonataslaw/getx/pull/1122
The new Dart version with null-safety was just released 馃槏
https://medium.com/dartlang/announcing-dart-2-12-499a6e689c87
The new Dart version with null-safety was just released 馃槏
https://medium.com/dartlang/announcing-dart-2-12-499a6e689c87
And this package is on the top 50 blocking packages 馃槄
https://github.com/dart-lang/sdk/wiki/Null-safety-migration-status
It also looks like @jonataslaw closed this PR https://github.com/jonataslaw/getx/pull/1122 without any comments. Hopefully it just means he's working on it himself! 馃檹
It also looks like @jonataslaw closed this PR #1122 without any comments. Hopefully it just means he's working on it himself! 馃檹
There is a branch null safety
https://github.com/jonataslaw/getx/tree/null-safety
It also looks like @jonataslaw closed this PR #1122 without any comments. Hopefully it just means he's working on it himself! 馃檹
There is a branch null safety
https://github.com/jonataslaw/getx/tree/null-safety
Yes, I know, which is where the PR was pointed to, to try to help @jonataslaw . When I made the comment there was no explanation, but now there is. Glad to see Jonathan is actively working on it. Hopefully we'll get it soon!
Good news!
Getx now supports null-safety
https://pub.dev/packages/get/versions/4.0.0-nullsafety.2
I look forward to your feedback to switch to stable.
In this version I added a resource for loading/success/error_handling with a single line of code
@jonataslaw usesdk: ">=2.12.0-0 <3.0.0", but
The current Dart SDK version is 2.12.0-259.16.beta.
Because shellpro depends on get >=4.0.0-nullsafety.0 which requires SDK version >=2.12.0 <3.0.0, version solving failed.
pub get failed (1; Because shellpro depends on get >=4.0.0-nullsafety.0 which requires SDK version >=2.12.0 <3.0.0, version solving failed.)
@jonataslaw use
sdk: ">=2.12.0-0 <3.0.0", butThe current Dart SDK version is 2.12.0-259.16.beta. Because shellpro depends on get >=4.0.0-nullsafety.0 which requires SDK version >=2.12.0 <3.0.0, version solving failed. pub get failed (1; Because shellpro depends on get >=4.0.0-nullsafety.0 which requires SDK version >=2.12.0 <3.0.0, version solving failed.)
Change flutter for stable channel
Most helpful comment
I'm fixing this so that everyone knows.
GetX 4.0 is coming along with the null-safety version.
Migrating to null-safety is improving even more the performance of GetX which is already very good, but we will go through some break changes (as well as any Flutter project that is migrated to null-safety), and for that we will launch a new version .
This new version will be very stable (any errors that may occur due to users' fault, or bad coding, will be eliminated in the new version).
GetX has not gone through many breakings changes since its creation. It is still in version 3, while many popular Flutter packages are already in version 5/6/7. However, I believe it is time to make small changes that will make GetX much more stable, not that it is not now, but that can cause structural problems.
I intend to launch an automation tool, which will convert your code from version 3 to version 4, so that our users undergo a painless modification.
The code that will be changed will be basically the navigation part.
GetX's state management is very stable and has received virtually no issues in recent months. Adding a ".obs" and wrapping the widget that will be changed to an "Obx (() =>)" just works. This is something simple, which works perfectly in any situation. There will not be many substantial changes in state management. In fact we are working to have no or almost no change in the break in the state management. However, we realize that all open issues are related to dependency injection and route management or internationalization.
Thinking about it, it's time to balance this, and make the whole framework even more harmonious, and for that it will be necessary to make small changes mainly in unnamed routes.
We are running tests with Navigator 2.0 and it will probably include the new version.
Currently on Flutter, Dialogs, Snackbars, BottomSheets are ROUTES.
And we are also studying to create a standalone api from Flutter based on overlay. This is not 100% sure, and we will still consult the community to make sure this is a change the community wants.