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

Add account picker to home screen #510

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jcgurango
Copy link
Collaborator

#464 turned out to not be very good in terms of maintanability and honestly is just too much refactoring work this far along. I've made this PR with a couple of commits from that branch + a different approach. Instead I decoupled AccountsStore from its saving to preferences functionality, and moved that out of the class to be handled elsewhere listening to the store for changes. I fiddled around with the concept of passing new accounts stores whenever accounts are selected, but it turns out the BuildContext passed to any routes you create is not the BuildContext you pass to Navigator.of(), it's the build context on which the Navigator itself is created (in this case within the top level MaterialApp unfortunately) so overriding the AccountsStore in the context. So now changing users just changes the "default account" which is already used all over the app. I think trying to muddle with individualizing accounts in routes (or even in the different stores) is going to be a nightmare refactoring job but at least I know that for a fact now.

@zachatrocity
Copy link
Collaborator

Looks like multiple build issues.

Could you try to build locally and see if you can fix the errors? I suspect it might be due to SDK versions

@jcgurango
Copy link
Collaborator Author

@zachatrocity Nope, now I can't build it. Can the builders be reverted to the older version of dart/flutter we were using? I remember Myk said something about not upgrading to the latest

@zachatrocity
Copy link
Collaborator

Yeah let me see how to do what with the GitHub actions

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

Successfully merging this pull request may close these issues.

None yet

2 participants