dwyl / dwyl/flutter-todo-list-tutorial

Persiting items using shared_preferences

Open
#21 6 comments 1 reaction 1 assignee Claimed by @SimonLab View on GitHub
question T4h technical
Dominant language
Dart
Stars
109
Forks
17
PR merge metrics
No merged PRs in 30d

Description

linked to #18

At the moment we can create new task and toggle then from uncomplete to complete.
However the state of the application is not saved and each time the application is restarted the items created are lost.

Using the shared preferences package we can save a serialized version of the application state (using json).
- [x] The first step is to know how to initialise the state of statefull widgets with [initState](https://api.flutter.dev/flutter/widgets/State/initState.html)
- [x] Once the list of items is loaded from the disk we will need to save the state each time an item is created and each time an item is toggled.

see: https://pub.dev/packages/shared_preferences

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.