setUserCategoryPreference static method

Future setUserCategoryPreference(
  1. int categoryId,
  2. bool categoryEnabled, {
  3. NetmeraCategoryChannel? channel,
})

If channel is omitted, the update applies to the category's global (all-channels) preference.

Implementation

static Future<dynamic> setUserCategoryPreference(int categoryId, bool categoryEnabled,
    {NetmeraCategoryChannel? channel}) async {
  return await _platform.invokeMethod(_setUserCategoryPreference, {
    "categoryId": categoryId,
    "categoryEnabled": categoryEnabled,
    "channel": channel?.rawValue,
  });
}