hey. I’m migrating my project to Koin 1.0.0-beta. ...
# koin
m
hey. I’m migrating my project to Koin 1.0.0-beta. Last piece of code I need to change is the definition of the factory:
Copy code
const val KOIN_PARAM_ACTIVITY = "activity"
module {
  factory { params: ParamterList -> PermissionManager(params[KOIN_PARAM_ACTIVITY]) }
}
according to the docs at beta.koin.io, it now should be defined as:
Copy code
factory { activity: FragmentActivity -> PermissionManager(activity) }
but this code obiously doesn’t compile. I can’t get it how it’s supposed to work as it stays in the doc:
Copy code
single{ view : View -> Presenter(view) }
since both
single
and
factory
accepts only lambda expression with one param of type
ParameterList
, not
View
, and not my
Activity
. What am I missing here?