Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.38 KB

File metadata and controls

43 lines (27 loc) · 1.38 KB

Sync Client Example: using the Dart SDK in a Flutter application

This example shows how to use ObjectBox Sync in a Flutter task list app written in Dart.

  • See the ObjectBox class on how to configure a Sync client and basic box operations.
  • See the Task class on how to define a simple entity.

Setup

Android Studio

  1. Open this directory in Android Studio with the Flutter plugin installed.

  2. To run the app, from the toolbar select a device and once it is started click Run 'main.dart'.

Other IDEs or from the command line

The basic steps to get this example running (assuming you have a working Flutter setup):

# Set up project, get latest dependencies
flutter pub get

# Run the app in debug mode
flutter run

If you make changes to the data model, run the ObjectBox generator to update generated files:

dart run build_runner build

Prerequisites

Ubuntu: If you get an error like "The following required packages were not found", make sure prerequisite packages required for Flutter desktop apps are installed.

Documentation