handleMethodCall method

Future handleMethodCall(
  1. MethodCall call
)

Implementation

Future<dynamic> handleMethodCall(MethodCall call) async {
  switch (call.method) {
    case 'getPlatformVersion':
      return platformVersion();
    case 'isChatWidgetVisible':
      return showChatWidget(call.arguments);
    case 'login':
      return login(call.arguments);
    case 'logout':
      return logout();
    case 'loginAsVisitor':
      return loginAsVisitor(call.arguments);
    case 'openConversations':
      return openConversations();
    case 'sendMessage':
      return sendMessage(call.arguments);
    case 'openParticularConversation':
      return openParticularConversation(call.arguments);
    case 'isLoggedIn':
      return isLoggedIn();
    case 'buildConversation':
      return buildConversation(call.arguments);
    default:
      throw PlatformException(
        code: 'Unimplemented',
        details:
            'kommunicate_flutter for web doesn\'t implement \'${call.method}\'',
      );
  }
}