Hello Dear member,
I am looking for a solution , my problem is
// this class is in a module Auth
sealed class AuthEvent{
.. contains different data class and object class
}
// this class is in module Dashboard
sealed class DashboardEvent{
.. contains different data class and object class
}
now I have a third module common.
Which contains generic components so sometimes I have to pass AuthEvent or DashboardEvent
fun GenericComponent(event: ClassName){
.. inside this function I want to use something like that event.sealed class (data class or object class)
}
Any suggestion for me so that, I pass generic type class object as a function parameter and based on that class, I am able to use its internal functions.
issues i got :
circulating dependencies => when i add auth module and dashboard module into common module gradle file.
2nd thing. i dont want to make multiple names parameters function because one common module function used in a different modules and in different classes. so each module can access common module which is working fine.