Loading topic
pubspec.yaml, use the Dart and Flutter command line, and read basic Dart. You don't need to know SQL yet, beca6 min readdrift, drift_flutter, drift_dev and build_runner to a project, and you have defined a Table class like TodoItems. Here you learn what the generator produces, how to run it, and how to fix the errors that come5 min readdrift_flutter, defined the TodoItems table, and run build_runner once. You should also be comfortable with Future, async/await, and constructors with optional positional parameters. Here you write the class that ties the tables to a S5 min readAppDatabase with the TodoItems table from the earlier chapters, and that build_runner has generated database.g.dart. You should also know what Future<int> and nullable types mean in Dart.5 min readAppDatabase with a TodoItems table and the generated database.g.dart file, as built in the previous chapters. You should also be comfortable with Future and async/await.4 min readAppDatabase with the TodoItems table from the earlier chapters. You should also know how select(...).get() returns rows. Here you will narrow a query with where, order it with orderBy, and cap it with limit. All three work the same for get() and 4 min readwatch() turns a one-time query into a live one. You should already know the select, where, and orderBy methods from the earlier chapters. You should also know how Dart Streams and StreamBuilder work, and have a working AppDatabase with a TodoItems table.4 min readwatch(), which turns a query into a stream that emits a new list whenever the underlying tables change. This chapter connects that stream to the widget tree with StreamBuilder. It also covers the mistakes that cause wasted queries or confusing screens.5 min readAppDatabase and TodoItems table from the earlier chapters, and that you are comfortable with async/await. It covers how to make several writes succeed or fail as a single unit.4 min readTodoItems table and an AppDatabase class, and that you can run build_runner. It also assumes you know basic SQL (ALTER TABLE, CREATE TABLE). A migration is the code that moves an existing database from one schema version to the 4 min readselect(...).get() and .watch(). Here you will read from two tables in one query and get typed objects back.4 min readAppDatabase with a TodoItems table, as built in earlier chapters. You should also be comfortable with generated row classes and companions.4 min readwatch() queries, as covered in the earlier chapters. You should also be comfortable with Dart part files and with the transaction method.3 min readAppDatabase class from the earlier chapters, including the addItem, allItems, updateItem, deleteDone and watchOpenItems methods. You should also know setUp and tearDown in package:flutter_test, and how to read a Dart Stream.4 min readwatch() queries, and that you know Dart isolates are separate memory heaps that communicate by message passing. You will learn when database work blocks the UI, how to run drift's SQLite connection on a backgrou5 min read