Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Important Questions - not issue #744

Closed
ahmaddarwesh opened this issue Oct 27, 2020 · 2 comments
Closed

Important Questions - not issue #744

ahmaddarwesh opened this issue Oct 27, 2020 · 2 comments
Assignees

Comments

@ahmaddarwesh
Copy link

This is not issue

Hi I have some questions.

  • Can I use one controller for all pages in App?
  • Can I use this package for production and big App?
  • Is there easy way to set transition for dialogs like pages move transitions
  • Can I use GetX Storage package instead shared_preferences package or it is like Hive database?

Sorry for posting here but I can't find right place to ask this questions.

@jonataslaw
Copy link
Owner

This is not issue

Hi I have some questions.

  • Can I use one controller for all pages in App?

The most common is one controller per page. However, as long as the pages have the same status, it is not a problem to have more than one page with the same controller, in the example application there are 3 pages sharing the same controller.
Remember that your controller must have a purpose. Having a controller that does 1 million things can violate the principle of SOLID's sole responsibility. This means that you can have several variables and methods within a controller, but the reason for it to change the state of the view must be one. You can also use GetNotifier to control the status of widgets, and well, the truth is that you can do whatever you want and work with any structure, but I recommend that you follow this for the health of your project.

  • Can I use this package for production and big App?

Yes, it is mature and stable enough for that.

  • Is there easy way to set transition for dialogs like pages move transitions

No, and I think it will hardly be added. The Flutter dialog api has some inconsistencies, especially with fullScreenDialogs. I have to change the default transition constantly so as not to show a black background, so I'm definitely not going to touch it anytime soon.

  • Can I use GetX Storage package instead shared_preferences package or it is like Hive database?

GetStorage is not a database, it is a replacement for SharedPreferences, but it should not be used as a database. I would say that if you need a database, Hive is the option. If you want to store key/value pairs, getStorage is the way to go.

Sorry for posting here but I can't find right place to ask this questions.

@ahmaddarwesh
Copy link
Author

Thank you a lot for your answer and for your awesome package ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants