createDomain method

Future<Domain> createDomain(
  1. {required DomainDescription domainDescription}
)

Creates a new domain in the geodatabase.

Creating domains is only supported in mobile geodatabases (either created in Pro or via Geodatabase.create). The FieldType of the domain cannot be unknown. The domain name must not already exist in the geodatabase. For additional domain name constraints, see DomainDescription.name.

Parameters:

  • domainDescription — The description of the domain to create.

Return Value: A Future that returns a Domain if one was able to be created.

Implementation

Future<Domain> createDomain({required DomainDescription domainDescription}) {
  return _createDomain(domainDescription: domainDescription).then((domain) {
    _domains.invalidateCache();
    return domain;
  });
}