ManualDisplayFilterDefinition.withFilters constructor

ManualDisplayFilterDefinition.withFilters(
  1. {required DisplayFilter? activeFilter,
  2. required List<DisplayFilter> availableFilters}
)

Creates a new ManualDisplayFilterDefinition with the specified active and available filters.

Parameters:

Implementation

factory ManualDisplayFilterDefinition.withFilters(
    {required DisplayFilter? activeFilter,
    required List<DisplayFilter> availableFilters}) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreAvailableFilters =
      availableFilters.toMutableArray(valueType: _ElementType.displayFilter);
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ManualDisplayFilterDefinition_createWithFilters(
        activeFilter?._handle ?? ffi.nullptr,
        coreAvailableFilters._handle,
        errorHandler);
  });
  final ManualDisplayFilterDefinition object =
      ManualDisplayFilterDefinition._withHandle(handle);
  object._activeFilter.cache(activeFilter);
  object._availableFilters.value.setCache(availableFilters);
  return object;
}