getCategoryById method

LandmarkCategory? getCategoryById(
  1. int categoryId
)

Get the category by ID.

Parameters

  • IN categoryId The category ID

Returns

  • The category if found, null otherwise

Throws

  • An exception if it fails.

Implementation

LandmarkCategory? getCategoryById(final int categoryId) {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'LandmarkStore',
    'getCategoryById',
    args: categoryId,
  );

  if (resultString['result'] == 0) {
    return null;
  }
  return LandmarkCategory.init(resultString['result'], _mapId);
}