getSocialReportsCategory method

OverlayCategory? getSocialReportsCategory(
  1. int categId, {
  2. String country = '',
})

Retrieves a specific social report category or subcategory by ID.

Looks up category using the unique categId identifier. Supports both main categories (e.g., Traffic 768) and subcategories (e.g., Heavy Traffic 771). Returns null if category not found for the specified country.

Parameters

  • categId: Unique category or subcategory identifier. See SocialReportsOverlayCategory for standard IDs.
  • country: ISO country code (e.g., "US", "GB"). Use empty string for generic/worldwide categories.

Returns

OverlayCategory if found, otherwise null.

See also:

Implementation

OverlayCategory? getSocialReportsCategory(
  final int categId, {
  final String country = '',
}) {
  final OperationResult result = objectMethod(
    pointerId,
    'SocialReportsOverlayInfo',
    'getSocialReportsCategory',
    args: <String, dynamic>{'categId': categId, 'country': country},
  );
  if (result['result']['uid'] == 0) {
    return null;
  }
  return OverlayCategory.fromJson(result['result']);
}