getCategoryByName method

LandmarkCategory? getCategoryByName(
  1. String name
)

Retrieves a specific category by its name from this store.

The match is exact and case-sensitive. Both built-in POI categories and user-created custom categories are eligible.

Parameters

  • name: The category name to look up.

Returns

Implementation

LandmarkCategory? getCategoryByName(final String name) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'LandmarkStore',
    'getCategoryByName',
    args: name,
  );

  if (resultString['result'] == -1) {
    return null;
  }

  return LandmarkCategory.init(resultString['result']);
}