is there a way to define handleStopRequest using f...
# announcements
c
is there a way to define handleStopRequest using fun? as if it was a normal extention function, but defined within the object, I couldn't figure out a way
w
Copy code
object ApiRequests {
  fun Context.handleStopRequest(request: StopsRequest) { }
}
?
And later on when you want to use it:
Copy code
fun Context.doSomething() { 
  with (ApiRequests) {
     handleStopRequest(request)
   }
}
c
there we go
still learning this after 1 year
thanks