sessionId property

Future<String> get sessionId

Implementation

static Future<String> get sessionId async {
  try {
    final result = await _channel.invokeMethod('getSessionID');
    latestError = null;
    return result?.toString() ?? "";
  } on PlatformException catch (e, s) {
    _internalLog("getSessionID failed", e, s);
    latestError = ShieldError(
      e.code,
      e.message ?? e.details?.toString() ?? "Unknown error",
      exception: e.details?.toString(),
    );
    return "";
  } catch (e, s) {
    _internalLog("getSessionID failed", e, s);
    latestError = ShieldError(
      "0",
      e.toString().isNotEmpty
          ? e.toString()
          : (s.toString().isNotEmpty ? s.toString() : "Unknown error"),
    );
    return "";
  }
}