sxncd 0.1.0 copy "sxncd: ^0.1.0" to clipboard
sxncd: ^0.1.0 copied to clipboard

Flutter plugin for incorporating SxncD into your application.


SxncD Flutter Library #

The Flutter library for SxncD, an Open Source Synchronization Server for use with any apps that that support a standard file import/export.

Usage #

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:

<the most recent settings data>

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:

<If success is false, the reason why>

0
likes
130
points
17
downloads

Publisher

verified publishernowsci.com

Weekly Downloads

Flutter plugin for incorporating SxncD into your application.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#utils #sync

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

crypto, encrypt, flutter, flutter_localizations, http

More

Packages that depend on sxncd