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

Get rid of global variables #132

Open
1 of 2 tasks
clangenb opened this issue Mar 3, 2021 · 1 comment
Open
1 of 2 tasks

Get rid of global variables #132

clangenb opened this issue Mar 3, 2021 · 1 comment
Labels
F0-pure flutter Flutter taks; does not need

Comments

@clangenb
Copy link
Member

clangenb commented Mar 3, 2021

Currently, we have two global variables in the dart code: gobalAppStore and webApi

I don't like this approach, as such code is not well testable.
Instead, we should use the provider pattern.

An elaboration on this topic is found in: global vs scoped access

I already made that transition in another (less complex) app, there it took me 4 hours to make it, work.

Our two globals are:

@brenzi
Copy link
Member

brenzi commented Mar 7, 2021

agree that this approach is superior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F0-pure flutter Flutter taks; does not need
Projects
None yet
Development

No branches or pull requests

2 participants