https://github.com/fmstrat/sxncd-flutter
The Flutter library for SxncD, an Open Source Synchronization Server for use with any apps that that support a standard file import/export.
https://github.com/fmstrat/sxncd-flutter
Last synced: 12 months ago
JSON representation
The Flutter library for SxncD, an Open Source Synchronization Server for use with any apps that that support a standard file import/export.
- Host: GitHub
- URL: https://github.com/fmstrat/sxncd-flutter
- Owner: Fmstrat
- License: gpl-3.0
- Created: 2025-02-25T22:07:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-26T18:25:14.000Z (over 1 year ago)
- Last Synced: 2025-02-26T22:41:11.487Z (over 1 year ago)
- Language: Dart
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# SxncD Flutter Library
The Flutter library for [SxncD](https://github.com/Fmstrat/SxncD), an Open Source Synchronization Server for use with any apps that that support a standard file import/export.
## Usage
```dart
import 'package:sxncd/sxncd.dart';
// When settings are changed:
String savedTs = DateTime.now().toIso8601String();
String settings = '{ "bool": true }';
// When it's time to sync
SxncdResponse syncResponse = await sxncdSync(
"http://host.tld", // The URL of the SxncD server
"730bd41d5df...", // The API key
"My Device", // The device name
settings, // The settings data
savedTs, // The last time settings were saved
"password", // An optional password to E2E encrypt data
);
```
## Response object
**success**
*bool*
Values:
```
true
false
```
**data**
*String?*
Values:
```
```
**action**
*String?*
Values:
```
created | A new settings entry was created.
none | The server-side data and device data are already up to date.
existingNewer | The server-side data is newer than what was sent by the device.
incomingNewer | The devices data is newer than the server-side data, so the
server has stored this new data.
```
**error**
*String?*
Values:
```
```