O'Reilly logo

Learning Dart by Ivo Balbaert, Dzenan Ridjanovic

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

Using the mongo_dart driver to store the todo data in MongoDB

MongoDB drivers exist for a whole range of programming languages, including Dart. We will use mongo_dart in our app, which is a server-side driver implemented purely in Dart. Simply add mongo_dart: any to your app's pubspec.yaml, and issue pub install. In the code, write:

import 'package:mongo_dart/mongo_dart.dart';

todo_mongodb is a version of todo_server_dartling_mysql, but now use MongoDB as a persistent data source (clone the project from https://github.com/dzenanr/todo_mongodb). It contains a client app todo_client_idb, identical to the one in the previous section, which stores data in IndexedDB. The server part todo_server_dartling_mongodb can be started by running bin/server.dart ...

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