createFeatureWithType method

ArcGISFeature createFeatureWithType(
  1. FeatureType featureType, {
  2. Geometry? geometry,
})

Creates a new feature based on the provided feature type and geometry.

Parameters:

  • featureType — Type of the feature.
  • geometry — The geometry.

Return Value: An ArcGISFeature.

Implementation

ArcGISFeature createFeatureWithType(
  FeatureType featureType, {
  Geometry? geometry,
}) {
  final objectHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ArcGISFeatureTable_createFeatureWithTypeAndGeometry(
      _handle,
      featureType._handle,
      geometry?._handle ?? ffi.nullptr,
      errorHandler,
    );
  });
  return ArcGISFeature._fromHandle(
    objectHandle,
  )!;
}