This example shows how to use ObjectBox Sync in a Flutter task list app written in Dart.
- See the
ObjectBoxclass on how to configure a Sync client and basic box operations. - See the
Taskclass on how to define a simple entity.
-
Open this directory in Android Studio with the Flutter plugin installed.
-
To run the app, from the toolbar select a device and once it is started click Run 'main.dart'.
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 runIf you make changes to the data model, run the ObjectBox generator to update generated files:
dart run build_runner buildUbuntu: If you get an error like "The following required packages were not found", make sure prerequisite packages required for Flutter desktop apps are installed.