Ditto

The Ditto Flutter SDK is an edge sync platform allowing devices to synchronize data with or without an internet connection.

For more info, go to ditto.com/link/docs

Platforms

Platform Supported
iOS Yes
Android Yes
Web Yes
MacOS Planned
Windows Planned
Linux Planned

Installation

Android build configuration

Use the following Android configuration with this package. It also supports the published ditto_live 5.1.0 and 5.2.0-preview.1 Android dependencies, which require API 36 and carry Kotlin 2.3 metadata.

Setting Supported configuration
Android Gradle Plugin (AGP) 8.13.2
Kotlin Gradle Plugin (KGP) 2.3.21
Gradle wrapper 8.13
JDK used to run Gradle 17 or newer supported by Gradle 8.13
Android SDK platform / app compileSdk 36
Android NDK 27.0.12077973
App minSdk 24 or newer

Flutter 3.32.0 creates apps with AGP 8.7.3, KGP 2.1.0, and compileSdk 35. Those defaults cannot build against these published Android dependencies. AGP 8.13.2 bundles R8 8.13.19, which supports Kotlin 2.3 metadata; older R8 versions can produce metadata parsing warnings during release shrinking even when the APK build succeeds. Upgrading Flutter alone does not update an existing app's Gradle files. Install Android SDK Platform 36 and NDK 27.0.12077973, then update the app configuration as follows.

In android/settings.gradle.kts, update the existing plugin declarations:

id("com.android.application") version "8.13.2" apply false
id("org.jetbrains.kotlin.android") version "2.3.21" apply false

In android/gradle/wrapper/gradle-wrapper.properties, use:

distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip

In android/app/build.gradle.kts, set compileSdk explicitly and replace the android.kotlinOptions block with kotlin.compilerOptions. Keep the Java and Kotlin bytecode targets equal; the Java 11 target from the Flutter 3.32.0 template can remain unchanged:

import org.jetbrains.kotlin.gradle.dsl.JvmTarget

// Keep the existing plugins block here.

android {
    compileSdk = 36
    ndkVersion = "27.0.12077973"
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }
    defaultConfig {
        minSdk = 24
    }
    // Keep the other existing Android settings.
}

kotlin {
    compilerOptions {
        jvmTarget.set(JvmTarget.JVM_11)
    }
}

For Groovy Gradle files, use the same versions with Groovy syntax, for example id "org.jetbrains.kotlin.android" version "2.3.21" apply false and jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11 inside kotlin { compilerOptions { ... } }.

Run flutter build apk --release after these changes to verify release packaging with R8 shrinking. An AAR metadata error about API 36 requires a compileSdk update; an incompatible Kotlin metadata error requires a KGP update. Changing only one does not resolve both failures. Do not suppress metadata checks with -Xskip-metadata-version-check.

See the AGP 8.13 compatibility table and the Kotlin compiler options migration guide.

Apple dependency managers

The iOS and macOS plugin supports Swift Package Manager and CocoaPods. Flutter projects using SwiftPM resolve the native library from a hosted ZIP with a SHA-256 checksum. CocoaPods projects download and verify the same ZIP during pod installation; they do not require a new CocoaPods Trunk release.

Libraries

ditto_live
The Flutter SDK for Ditto