Skip to content

Scoped service per screen or page #372

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
malabuyocfritz1984 opened this issue Sep 1, 2024 · 1 comment
Closed

Scoped service per screen or page #372

malabuyocfritz1984 opened this issue Sep 1, 2024 · 1 comment

Comments

@malabuyocfritz1984
Copy link

malabuyocfritz1984 commented Sep 1, 2024

Hi,

I'm new to get_it so apologies in advance.

But Is there a way to create a scoped service per screen or page?

In .net we have like an AddScoped(MyService()), which registers the service with a scoped lifetime, Scoped Service are the same within an http request, but different across different http requests.

is that possible with get_it? a scope per screen and when the screen is closed, these scoped service will be disposed as well

@malabuyocfritz1984 malabuyocfritz1984 changed the title Scoped server per screen or page Scoped service per screen or page Sep 1, 2024
@escamoteur
Copy link
Collaborator

escamoteur commented Sep 1, 2024 via email

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