# QuickAction.removeFromPrefs constructor

QuickAction.removeFromPrefs(

1. QuickActionItem item

)

## Implementation

    QuickAction.removeFromPrefs(QuickActionItem item) {
      // Get old lists
      List<String> quickSettingsTitles =
          prefs.getStringList('quickSettingsTitles') ?? [];
      List<String> quickSettingsContents =
          prefs.getStringList('quickSettingsContents') ?? [];

      // Remove from list
      if (quickSettingsTitles.contains(item.name)) {
        int index = quickSettingsTitles.indexOf(item.name);
        quickSettingsTitles.removeAt(index);
        quickSettingsContents.removeAt(index);
      }

      // Set shared prefs
      prefs.setStringList('quickSettingsTitles', quickSettingsTitles);
      prefs.setStringList('quickSettingsContents', quickSettingsContents);
    }