withUri static method

PortalItem? withUri(
  1. Uri uri
)

Creates a portal item from the specified portal item URL.

Use this object to create a portal item from a URL. The supported URL formats are:

Parameters:

  • uri — The URL to the portal item.

Implementation

static PortalItem? withUri(Uri uri) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreURI = _CString(uri.toString());
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_PortalItem_createWithURL(
        coreURI.bytes, errorHandler);
  });
  if (handle == ffi.nullptr) return null;
  return Item._instanceCache.instanceWith(handle);
}