setServerUrl method

Future<void> setServerUrl (
  1. {@required String serverUrl}
)

Modifies the URL of the Mobile Foundation server during runtime to serverUrl. Calling this method clears the client context and the app is no longer logged in to any Mobile Foundation server. Subsequent calls to the Mobile Foundation server will cause a new device registration. Verifying the validity of the new URL is on the developer.

serverUrl must be of the format http://mobilefoundationserver.domain.com:port/mfp

This is a non blocking call and can be awaited

Implementation

Future<void> setServerUrl({@required String serverUrl}) async {
  return await _channel.invokeMethod(
      WLCLIENT_SETSERVERURL, <String, dynamic>{SERVER_URL: serverUrl});
}