I have a question with using SQLDelight in a Compo...
# compose-desktop
a
I have a question with using SQLDelight in a Compose desktop app. Right now, my main function instantiates ApplicationState -> WindowState -> etc. Where do you usually instantiate the Database object and add initial content to it? And do you do that in a Repository singleton with Kotlin flows? Just wondering if there's some sample app that people can share. Thanks!
m
I use koin for dependency injection, it makes it a lot easier and I inject the database to the repository. This project of mine contains exactly what you need. https://github.com/M0Coding/Pokedex
a
yup, that's the same thing I do.
a
@mohamed rejeb Thanks for sharing, that's a cool app!