Making a To-do List App

Followed this tutorial.

Index is given in the itemBuilder, as itemBuilder is automatically called as many times as it takes to fill its available space (and therefore iterates through the indices of the list). Then passed from there to _buildTodoItem, and built into that item’s _promptRemoveTodoItem call.

Flutter Core Principles for reference.

The tutorial above doesn’t include saving to-do list items. Following this tutorial on saving data locally next. Then, saving data to the cloud.

Saving Locally

Using Shared Preferences just as a way to get my feet wet with saving data. Shared Preferences are deleted when the user uninstalls the app, so they shouldn’t be used for anything that persists between installs or across devices. Also for reading and writing Shared Preferences, use an async function for efficiency, as otherwise it can get too resource-intensive and affect performance.

Setting this up is simple enough but due to the asynchronous nature of it, sometimes the tasks aren’t loaded when the user first opens the app. It might help to put the user on a landing page or something so that the app has time to read the tasks.

Next time: Saving Data to the cloud.

Leave a comment