Ryan Smith02/21/2023, 1:35 AM
class to manage APK data, and the data source is just a private
property of the repository itself. In trying to adhere to advice from different things I've read, my repository exposes the data as a
and CRUD methods as suspending functions. IntelliJ is indicating that all of the suspend modifiers on my
functions are redundant so I'm feeling like I did something wrong there. I'm trying out another simple app and would like to learn from my past mistakes, so any advice or examples is appreciated. I've considered that maybe suspending functions and
are just overkill for such a simple app, but at the same time hope that it's possible to use contrived, low-complexity use cases like this to better understand coroutine and Flow concepts.
Chris Fillmore02/21/2023, 2:18 AM
is a synchronous operation, so suspend is not necessary there. Or do the suspend methods do something else, like work with files/db?
Ryan Smith02/21/2023, 2:39 AM
. I see now thats not a suspending function... so I suppose by the choice I've made there I've made
on those functions unnecessary. I guess I could try a data source where CRUD operations work on files.