aipok
06/14/2021, 10:09 AMdefault parameter
. Otherwise you will get Declaration parameter error
.
2. Second pain point I got is related to the parametersOf
/ params
and class casting. Especially that causes error if you pass an implementation of the interface, but interface is expected as a parameter for the instance constructor. In this case params.[get|get<Something>|getOrNull]
will not work, because expected T::class
isn’t the parameter::class
. The only way I get it to work is to use params[0]
.
I assume all this could lead to confusion for people and also will take some time without a proper guidance in which case what should be used.
Added samples to thread as well for illustration purposes 👀
It could be also that I misunderstood the concept or something… in this case I would appreciate if someone who aware could give highlight for me.Slackbot
06/14/2021, 10:27 AMalorma
06/15/2021, 4:10 PM3.1.0
crashes with:
Process: <http://com.alorma.online|com.alorma.online>, PID: 27063
java.lang.NoSuchMethodError: No interface method startReplaceableGroup(ILjava/lang/String;)V in class Landroidx/compose/runtime/Composer; or its super classes (declaration of 'androidx.compose.runtime.Composer' appears in /data/app/~~Blc5lbQ6ufp-BTmeiEZj8Q==/com.alorma.online-HU9SyBXOt-tG6CArGrkzLg==/base.apk)
Abhishek Dewan
06/18/2021, 5:53 PMviewModel(override = true) { SearchScreenViewModel(get()) }
I am guessing that the override param was removed from the viewModel call (release notes mention something about it s being a global option). Could someone explain as to what that means and how would we configure something like this in the new system.
On a side note the documentation for the function still mentioned override as a accepted param (most likely an oversight) but thought you might want to know 🙂Rak
06/21/2021, 8:03 AMarnaud.giuliani
06/24/2021, 8:26 AMSlackbot
06/24/2021, 4:40 PMFanilog
06/25/2021, 2:07 PMhttps://www.youtube.com/watch?v=0z_dwBGQQWQ▾
Mini
06/29/2021, 8:55 AM@get:Rule
val koinTestRule = KoinTestRule.create {
modules(module)
}
and stopKoin @After
@After
fun stopKoin() {
stopKoin()
}
however the very first test that is run fails with java.lang.IllegalStateException: No Koin application found
but the following tests run just fine. What could be the reason for this? 😞Mark
06/29/2021, 10:36 AMsingle(createdAtStart = true)
being started more eagerly than in 3.0.1. Now it seems that such declarations are immediately invoked. Is this working as intended (i.e. 3.0.1 was faulty) or a bug in 3.1.1?Rak
06/29/2021, 3:09 PMVivek Modi
07/01/2021, 11:50 AMLG
07/01/2021, 8:27 PMv.3.1
and I have some issue with the injection of the SavedStateHandle
in my ViewModel
When my viewmodel is called for the first time in my Fragment, I received a new SavedStateHandle and not the one I see from the Fragment
Does anyone have an idea
Here’s the code:
VM
class ArticleViewModel(
private val savedStateHandle: SavedStateHandle,
private val useCase: ArticleUseCase) : ViewModel() {
AppModule
viewModel { ArticleViewModel(get(), get()) }
kevindmoore
07/02/2021, 6:53 PMYahor
07/04/2021, 4:03 PMNikky
07/05/2021, 10:51 AMFanilog
07/07/2021, 4:06 PMJohn O'Reilly
07/09/2021, 9:22 PMNacho Ruiz Martin
07/12/2021, 3:58 PMPeople in Space
handle the Koin injection in a multiplatform project and both are pretty cool. But in the long term, you will also need a DI framework for the Swift app.
I know this is a long, shot, but is there any way or future plan to include the injection on the iOS app itself using Koin?
I mean, not needing another DI framework.
This would make Koin super powerful in multiplatform projects.
What do you think? Is it possible in any way?Merseyside
07/14/2021, 11:43 AMscope(qualifier = named<Fragment1>()) { ... }
Also I want to share one viewModel between them. I found that I need t create one more scope with viewModel and link it with both fragment's scopes. Is it a good practise? Any suggestions how to do this correctly?
Also they are not parent and child. It's two different fragment in navigation graphMark
07/15/2021, 2:40 AMGlobalContext.get()
with KoinPlatformTools.defaultContext().get()
?Marko Novakovic
07/17/2021, 2:25 PMScott Kruse
07/22/2021, 8:36 PMViewModel(sharedComponent, OtherComponent(sharedComponent))
Christopher Porto
07/23/2021, 10:10 PMDirk Seewald
07/24/2021, 3:37 PMholgerbrandl
07/28/2021, 6:34 PMsmthg.getKoin().get(FooBar.class)
does not work because the argument is not a KClass, but I have no clue how to create one from java.Scott Kruse
07/29/2021, 3:00 PMViewModel
is instantiated via by inject()
instead of by viewModel()
?Nacho Ruiz Martin
08/03/2021, 3:50 PMviewModel
to a navigation graph using Jetpack compose navigation?
I would like a viewModel
to be used by several composables and get cleared and reinstantiated when the user exists -> reenters to that screen flow.Jgafner
08/03/2021, 5:51 PMAdriano Rocha
08/12/2021, 8:59 PMAdriano Rocha
08/12/2021, 8:59 PMFatih
09/09/2021, 7:44 PM