mgrzechocinski
07/13/2018, 7:01 PMconst 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:
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:
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?