getSocialReportsCategory method
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:
- getSocialReportsCategories - Retrieves all main categories.
- null if the category is not found.
- MapDetails - Provides country information.
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']);
}