How to create a checkbox list Using a CheckboxListTile

Flutter tips Published on

Building a List of Checkboxes in Flutter

Creating lists where users can pick options is a basic need in many apps. If you want a list where people can select one or more items, a checkbox list is a great way to go. Flutter makes making these lists quite simple using the CheckboxListTile widget.

What is CheckboxListTile?

Instead of putting together a text label and a checkbox separately, CheckboxListTile does it all for you in one handy widget. It includes a place for the item's name (the title) and the checkbox itself.

Putting it in a List

A common way to show a list of these is by using ListView.separated. This builds your list items one by one. For each item in your data, you'll create a CheckboxListTile.

Key Parts of CheckboxListTile

Using shrinkWrap: true on your ListView is a good practice if this list is nested inside another scrollable view. It helps the list figure out its size correctly and prevents weird scrolling glitches.

By connecting the value to your item's current state and using onChanged to update that state and refresh the view, you can easily build interactive checkbox lists.

Save 3 months of work

Create your app using our 6 years of making Flutter apps and more than 50+ apps

kickstarter for flutter apps

Frequently Asked Questions

What is CheckboxListTile?

It's a Flutter widget that combines a text label (title) with a checkbox, making it easy to create list items where users can select options.

How do I show if an item is selected?

You use the `value` property of the CheckboxListTile. Set it to `true` if the item is selected, and `false` if it's not.

How do I know when a user taps a checkbox?

The `onChanged` property lets you run a piece of code every time the user taps the checkbox or the list item, giving you a chance to update the item's state.

Why use shrinkWrap: true on the ListView?

Setting `shrinkWrap: true` helps the list determine its size correctly when it's placed inside another scrolling area, preventing double scrolling or layout issues.

Read more
You may also be interested in
Flutter tips - How to crop image  blog card image
Flutter tips - How to crop image
Published on 2025-05-12T11:42:08.392Z
Run your tests with multiple variants  blog card image
Run your tests with multiple variants
Published on 2025-05-12T12:23:50.718Z
ApparenceKit is a flutter template generator tool by Apparence.io © 2025.
All rights reserved