Skip to content

chayanforyou/expandable-list-flutter

Repository files navigation

Expandable List with Add/Delete Functionality in Flutter

This Flutter project demonstrates how to create an expandable list that initially displays a limited number of items, with the option to show more or less using a toggle button. Additionally, it includes functionality for adding new items to the list and deleting individual items.

Features

  • Expandable List: The list shows a specified number of items by default, with the option to show the entire list or collapse it.
  • Add New Item: Add new items to the list dynamically using an "Add" (+) button.
  • Delete Item: Each list item has a delete button, allowing the user to remove items individually.
  • Toggle View: A "Show more" button appears when there are more items than initially shown. It toggles to "Show less" when the full list is displayed.

Demonstration

sample.mp4

Customization

  • Change Initial Display Count: Modify the itemCount variable to change how many items are shown by default.
  • Styling: Customize the appearance of the buttons and list items by modifying the widgets.

Contributing

Contributions are welcome! Please fork this repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.