private void OnPackageChanged()
        {
            var displayPackage = Display(package);

            if (displayPackage == null)
            {
                return;
            }

            NameLabel.text    = displayPackage.DisplayName;
            VersionLabel.text = displayPackage.Version.ToString();

            var stateClass = GetIconStateId(package.Current ?? package.Latest);

            StateLabel.RemoveFromClassList(currentStateClass);
            StateLabel.AddToClassList(stateClass);

            if (package.Current == null && PackageCollection.Instance.Filter == PackageFilter.All)
            {
                PackageContainer.AddToClassList("not-installed");
            }
            else
            {
                PackageContainer.RemoveFromClassList("not-installed");
            }

            UIUtils.SetElementDisplay(VersionLabel, !PackageInfo.IsModule(package.Name));

            currentStateClass = stateClass;
            if (displayPackage.State != PackageState.InProgress && Spinner.Started)
            {
                Spinner.Stop();
            }
        }
        public void SetSelected(bool value)
        {
            if (value)
            {
                PackageContainer.AddToClassList(SelectedClassName);
            }
            else
            {
                PackageContainer.RemoveFromClassList(SelectedClassName);
            }

            Spinner.InvertColor = value;
        }