Hello,
I'm trying to add a feature to FeatureService but I have error at addFeature function.
var _serviceFeatureTable = ServiceFeatureTable.withUri(Uri.parse("$link/0"));
final newFeature = _serviceFeatureTable.createFeature(
attributes: {
'FORMID': 'My',
'POINT_TYPE': 'Titik Mula',
},
geometry: ArcGISPoint(
y: 2.557467637393963,
x: 101.76854136321231,
),
);
print("ADD FEATURE");
await _serviceFeatureTable.addFeature(newFeature);
print("APPLY EDIT");
final editResults = await _serviceFeatureTable.applyEdits();
// Check if the edit was successful
if (editResults.isNotEmpty && editResults.first.error == null) {
print("SUCCESS");
print("New feature OBJECTID: ${editResults.first.objectId}");
} else {
print("ApplyEdits error: ${editResults.first.error}");
}
But i get this error:
ArcGISException: code=3030; Geodatabase value is null.; OBJECTID cannot be null. Encountered on feature with ID of -9223372036854775808.
What did I do wrong?