O'Reilly logo

Mastering Dart by Sergey Akopkokhyants

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Web SQL

Web SQL was introduced by Apple and is based on a free database SQLite. It will be discontinued very soon, and I intend to add it here only to show you how it could be used and how we can migrate to other advanced techniques without glitches. In the following code, we created a new shopping_cart_web_sql project as a copy of the project from the Web Storage section and added WebSQLStorageManager into the StorageManager class:

abstract class StorageManager { factory StorageManager() { if (WebSQLStorageManager.supported) { return new WebSQLStorageManager(); } else if (WebStorageManager.supported) { return new WebStorageManager(); } else { return new CookieStorageManager(); } } Future<String> getItem(key); Future setItem(key, value); Future ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required