You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ksp] com.ramcosta.composedestinations.codegen.commons.IllegalDestinationsSetup: Destination composable names must be unique: found multiple named 'Screen'
abstract class BaseScreen {
protected abstract val viewModelClass: Class<VIEW_MODEL>
@Composable
protected abstract fun Screen(
someInterface: SomeInterface,
bundle: Bundle?
)
...
}
class ScreenA: BaseScreen (){
....
@Composable
@Destination("routeA")
override fun Screen(
someInterface:SomeInterface,
bundle: Bundle?
) {
}
class ScreenB: BaseScreen (){
....
@Composable
@Destination("routeB")
override fun Screen(
someInterface:SomeInterface,
bundle: Bundle?
) {
}
Is there any way that we can give individual names for Composables?
Version 0.8.3-alpha05
The text was updated successfully, but these errors were encountered:
No, there is no way as of now. Besides, Compose Destinations would not able to call your "Screen" Composables. Because it would need to instantiate these classes to call them 🤔
I'm super curious, why do you need the base class? This is pretty much the same that happens with the library, we have an interface Destination which is the base class.
I guess my question is: what do you do with class BaseScreen? Do you put instances of it in a list or something like that?
What is "bundle" argument?
Also, I would advise against doing this type of thing because someday you may need some Screens to be extension functions of ColumnScope or AnimatedVisibilityScope or something like that. In your case that would not work.
In summary, you are fighting against the library instead of making use of its power 😄 💪
[ksp] com.ramcosta.composedestinations.codegen.commons.IllegalDestinationsSetup: Destination composable names must be unique: found multiple named 'Screen'
Is there any way that we can give individual names for
Composables
?Version
0.8.3-alpha05
The text was updated successfully, but these errors were encountered: