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

Global database connection can access in by any screen #1136

Open
devlooper90 opened this issue Oct 22, 2024 · 1 comment
Open

Global database connection can access in by any screen #1136

devlooper90 opened this issue Oct 22, 2024 · 1 comment

Comments

@devlooper90
Copy link

Hi, any idea about create one global database connection that can access by any screen of app (without passing the database connection between screens from main screen).

@alextekartik
Copy link
Contributor

Many developers won't like that but you can simply make a global variable:

late Database globalDatabase;

that you initialize in your main()

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