Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.50 KB | None | 0 0
  1.         viewModel.methodChannelFaq.setMethodCallHandler { call, result ->
  2.             when(call.method){
  3.                 METHOD_GET_FAQ -> {
  4.                     viewModel.getFaqValue {
  5.                         if (it is Throwable) {
  6.                             result.error("internet", it.localizedMessage, it.localizedMessage)
  7.                         } else {
  8.                             result.success(it)
  9.                         }
  10.                     }
  11.                 }
  12.             }
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement