Skip to content

Push PerAccountRoot under MaterialApp, into each individual page widget #21

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

Closed
gnprice opened this issue Mar 3, 2023 · 2 comments · Fixed by #32
Closed

Push PerAccountRoot under MaterialApp, into each individual page widget #21

gnprice opened this issue Mar 3, 2023 · 2 comments · Fixed by #32
Assignees
Labels
a-model Implementing our data model (PerAccountStore, etc.)

Comments

@gnprice
Copy link
Member

gnprice commented Mar 3, 2023

This will let us have a single MaterialApp that can navigate between pages that are for different accounts, as well as pages like the login flow and account-switch UI that are for no particular account at all. That makes it a necessity for doing #11 in a reasonable way.

One part of this will be to let the PerAccountRoots for a given account all point to a single PerAccountStore. That's this TODO from #20 which I just sent:

  // TODO add a registry of [PerAccountStore]s, like the latter's of [MessageListView]
  //   That will allow us to have many [PerAccountRoot] widgets for a given
  //   account, e.g. at the top of each page; and to access server data from
  //   outside any [PerAccountRoot], e.g. for handling a notification.

The other part to take care of will be arranging that the API we provide for ourselves to use when we're adding new routes, and navigating to routes, isn't too annoying or error-prone. I have some thoughts and we'll see how it looks after I experiment.

@Sudhanva-Nadiger

This comment was marked as off-topic.

@gnprice

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-model Implementing our data model (PerAccountStore, etc.)
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants