setServerUrl static method

Future<bool> setServerUrl({
  1. required String apiUrl,
  2. required String authUrl,
})

Set server URLs for API and authentication

Parameters:

  • apiUrl: API server URL
  • authUrl: Authentication server URL

Returns true if URLs set successfully

Implementation

static Future<bool> setServerUrl({
  required String apiUrl,
  required String authUrl,
}) async {
  try {
    final bool result = await _channel.invokeMethod(
      EzvizChannelMethods.setServerUrl,
      {
        'apiUrl': apiUrl,
        'authUrl': authUrl,
      },
    );
    return result;
  } catch (e) {
    ezvizLog('Error setting server URL: $e');
    return false;
  }
}