Loading topic
async and await, add a package to pubspec.yaml, and build a basic Flutter app with state. You will learn how shared_preferences works, how to read and write each supported type, and the mistakes that most often cause bugs.5 min readshared_preferences takes primitives, files take strings or bytes, and sqflite takes maps of column names to values. This chapter covers the conversion step that sits in front of all three: turning a model into a map or JSON, and turning it back saf5 min readFuture, async, await), can add a package to pubspec.yaml, and have seen the Note model with toMap and fromMap from the previous chapter. Here you learn where an app may write files on each platform, how path_provider finds those places, 6 min readFuture, async and await, can add packages in pubspec.yaml, and have read the earlier chapters on serialization and path_provider. Here you will write and read files that hold app data. You will also see how to make those writes safe against crashes and 5 min readshared_preferences, write async Dart with await, and add a package to pubspec.yaml. You need those to follow the code. The goal is to store tokens and other credentials in a place the operating system protects, and to understand what that5 min readasync/await, and how to add a package in pubspec.yaml. You should also have seen path_provider and file storage in the earlier chapters. By the end you will be able to open a SQLite database, create its first table, and share one connection across yo6 min readNote class with toMap and fromMap, and that you are comfor5 min readpinned flag, a timestamp, or an index. Users who installed an earlier version already have a notes.db file on their device with the old schema. This chapter covers how sqflite lets you upgrade that file in place without losing dat5 min readonCreate, onUpgrade, whereArgs and Future/Stream, and you should know how to add packages and run commands from the project root.5 min readshared_preferences, files and sqflite. It also assumes you are comfortable with Dart Futures and with the Note model and its toMap and fromMap methods. Here you learn what an embedded NoSQL store is, which options exist for Flutt6 min readasync and await, and build a simple stateful Flutter widget. It also assumes you have the Note model with toMap and fromMap, and the openNotesDatabase function from the SQLite chapters. The code here reuses both.5 min readshared_preferences helper, a Note model with toMap and fromMap, and a sqflite database with onCreate and onUpgrade. You should also know the basics of flutter_test: test, setUp, tearDown and expect. This chapter shows how to test that code wi5 min readshared_preferences, plain files, flutter_secure_storage and SQLite through sqflite. This chapter turns those tools into a decision. It assumes you can write async Dart, you have added packages through pubspec.yaml,6 min read