Portal constructor
- Uri uri, {
- PortalConnection connection = PortalConnection.anonymous,
Creates a portal object.
The supported URL formats are:
- The URL of the portal (Example: https://www.arcgis.com)
- The URL of the portal REST endpoint (Example: https://www.arcgis.com/sharing/rest)
- The URL of the deprecated portal REST endpoint (Example: https://www.arcgis.com/sharing)
If the portal permits anonymous access and you want to connect anonymously, set connection
to PortalConnection.anonymous. If you want to connect to the portal using an identity, you should set
connection
to PortalConnection.authenticated and an authentication challenge will be issued to first
request a credential.
Parameters:
uri
- The URL to the portal.connection
- The connection type used while loading the portal.
Implementation
factory Portal(
Uri uri, {
PortalConnection connection = PortalConnection.anonymous,
}) {
final portal = Portal._withUri(uri: uri);
portal._portalHelper.init(portal, connection);
return portal;
}