An open API service indexing awesome lists of open source software.

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.

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:
```

```