title: How to remove an item from the list widget using a button on kivymd
body: <p>I'm having a problem on how can I remove an item from the list widget using a button and possibly how can I clear the widget after checking all the item.</p>
  <p>py.file</p>
  <pre><code>class MenuScreen(Screen):
      def add_item(self):
          global lst
          i = 0
          if self.ids.inp.text == &quot;&quot;:
              close_button = MDFlatButton(text=&quot;Okay&quot;, on_release=self.close_dialog)
              self.dialog = MDDialog(title=&quot;Invalid&quot;, text=&quot;No item added&quot;,
                                     size_hint=(0.7, 1), buttons=[close_button])
              self.dialog.open()
          else:
              list_items.append(self.ids.inp.text)
              self.ids.inp.text = ''
              for x in range(len(list_items)):
                  lst = OneLineAvatarIconListItem(text=list_items[i])
                  i += 1
              self.ids.list.add_widget(lst)
  
      def close_dialog(self, obj):
          self.dialog.dismiss()
  
      def remove_item(self):
          pass
  </code></pre>
  <p>Example image:
  <a href="https://i.stack.imgur.com/44Xkp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/44Xkp.jpg" alt="enter image description here" /></a></p>