removeCategory method
Remove a category (by id) from an overlay in the collection.
Parameters
overlayId: Parent overlay UID.categoryId: Category identifier to remove.
Returns
- GemError.success when the category was removed.
- GemError.notFound when the overlay or category was not present.
See also:
- OverlayInfo.uid - Retrieve the unique identifier of an overlay.
- OverlayCategory.uid - Retrieve the unique identifier of a category.
- containsCategory - Check for a specific OverlayCategory within an OverlayInfo.
- remove - Remove an overlay with all categories from the collection.
Implementation
GemError removeCategory({
required final int overlayId,
required final int categoryId,
}) {
final OperationResult resultString = objectMethod(
pointerId,
'OverlayMutableCollection',
'removeCategory',
args: <String, int>{'overlayId': overlayId, 'categoryId': categoryId},
);
return GemErrorExtension.fromCode(resultString['result']);
}