setSelectedType method

void setSelectedType(
  1. TmdbTitleType type
)

Sets the selected title type

type - The title type to set (movie or TV show)

Implementation

void setSelectedType(TmdbTitleType type) {
  if (_selectedType != type) {
    _selectedType = type;

    // If we have a genre selected, reload titles with the new type
    if (_selectedGenreId != null) {
      loadTitlesByGenre(_selectedGenreId!, _selectedType);
    }
    _selectedGenreId = null;

    notifyListeners();
  }
}