ditto_live library
The Flutter SDK for Ditto
Subclassing and SemVer
This package respects SemVer.
However, we reserve the right to add methods/fields/etc. to classes in a minor version release. In other words, adding a new API to a class does not constitute a breaking change.
Classes
- Attachment
- An attachment which can be used to insert the associated data into a document at a specific key-path. Instances of this class cannot not be created directly, instead use the Store.newAttachment and Store.fetchAttachment methods.
- AttachmentFetcher
- These objects are returned by calls to Store.fetchAttachment.
- AttachmentFetchEvent
- A representation of the events that can occur in relation to an attachment fetch.
- AttachmentFetchEventCompleted
- An attachment fetch event for when the download has completed.
- AttachmentFetchEventDeleted
- An attachment fetch event for when the attachment is deleted.
- AttachmentFetchEventProgress
- An attachment fetch event for when the download has progressed but is not yet complete.
- AttachmentMetadata
- Represents metadata for an attachment, defined as a key-value map.
- AttachmentToken
-
An AttachmentToken can be passed in the
argumentsfield of Store.execute to insert an attachment into a document, or used with Store.fetchAttachment to retrieve the attachment data. - AuthenticationStatus
- Provides info about the authentication status.
- Authenticator
- An object that provides access to authentication information and provides methods for logging into Ditto Cloud.
- AuthResponse
- Represents the result of a login attempt.
- AwdlConfig
- P2P AWDL configuration. Part of PeerToPeer.
- AwdlConfigBuilder
- Builder class for AwdlConfig
- BluetoothLEConfig
- P2P BluetoothLE configuration. Part of PeerToPeer.
- BluetoothLEConfigBuilder
- Builder class for BluetoothLEConfig
- Connect
- ConnectBuilder
- Builder class for Connect
- Connection
- Represents a connection between two peers in a Ditto mesh network.
- ConnectionBuilder
- Builder class for Connection
- ConnectionRequest
- Contains information about a remote peer that has requested a connection.
- Diff
- Represents a diff between two arrays.
- Differ
- Calculates diffs between arrays of QueryResultItems.
- DiffMove
- Represents a move of an item from one index to another.
- Ditto
- The main entrypoint for all Ditto-related functionality.
- DittoConfig
- A configuration object for initializing a Ditto instance.
- DittoConfigBuilder
- Builder class for DittoConfig
- DittoConfigConnect
- Specifies how this instance discovers and connects to peers, including network settings and authentication options. This is a substructure of DittoConfig.
- DittoConfigConnectBuilder
- DittoConfigConnectServer
- Connects this Ditto instance to a Big Peer at the specified URL.
- DittoConfigConnectServerBuilder
- Builder class for DittoConfigConnectServer
- DittoConfigConnectSmallPeersOnly
- DittoConfigConnectSmallPeersOnlyBuilder
- Builder class for DittoConfigConnectSmallPeersOnly
- DittoConfigExperimental
- Experimental configuration options for DittoConfig.
- DittoConfigExperimentalBuilder
- Builder class for DittoConfigExperimental
- DittoLogger
- A class with static methods to customize the logging behavior for Ditto.
- DittoSyncPermissions
- A utility class for identifying and requesting missing platform permissions.
- GlobalConfig
- Settings not associated with any specific type of transport. Part of TransportConfig.
- GlobalConfigBuilder
- Builder class for GlobalConfig
- HttpListenConfig
- HTTP & WebSocket listening configuration. Part of Listen.
- HttpListenConfigBuilder
- Builder class for HttpListenConfig
- LanConfig
- P2P LAN configuration to configure peer discovery via mDNS or multicast. Part of PeerToPeer.
- LanConfigBuilder
- Builder class for LanConfig
- Listen
- Configure this device as a Ditto server. Disabled by default.
- ListenBuilder
- Builder class for Listen
- MulticastBetaConfig
- Configuration for reliable UDP multicast transport.
- MulticastBetaConfigBuilder
- Builder class for MulticastBetaConfig
- Peer
- Peer in the Ditto mesh.
- PeerBuilder
- Builder class for Peer
- PeerToPeer
- Configuration of peer-to-peer transports, which are able to discover and connect to peers on their own.
- PeerToPeerBuilder
- Builder class for PeerToPeer
- Presence
- An object that provides access to information about Ditto peers connected to this peer.
- PresenceGraph
- Graph of all known peers generated by Presence methods.
- PresenceGraphBuilder
- Builder class for PresenceGraph
- PresenceObserver
- A handle returned from Presence.observe.
- QueryResult
- Represents the result of executing a DQL query.
- QueryResultItem
- Represents a single match of a DQL query, similar to a “row” in SQL terms.
- SmallPeerInfo
- An object that provides access to Ditto's small peer info APIs.
- Store
- An object that provides access to Ditto's store.
- StoreObserver
- An object that tracks when results for its query change.
- StoreObserverV2
- An object that tracks when results for its query change, with explicit control over when to signal readiness for the next update.
- Sync
- An object that provides sync-related functionality of Ditto.
- SyncSubscription
- Configures Ditto to receive updates from remote peers about documents matching the subscription's query.
- TcpListenConfig
- TCP listening configuration. Part of Listen.
- TcpListenConfigBuilder
- Builder class for TcpListenConfig
- Transaction
- Represents a transaction in the Ditto store.
- TransactionInfo
- Encapsulates information about a transaction.
- TransportConditionEvent
- A condition reported by a specific transport subsystem.
- TransportConditionsObserver
- A handle returned from Ditto.observeTransportConditions.
- TransportConfig
- A configuration object specifying which network transports Ditto should use to sync data.
- TransportConfigBuilder
- Builder class for TransportConfig
- WifiAwareConfig
- P2P Wi-Fi Aware configuration. Part of PeerToPeer.
- WifiAwareConfigBuilder
- Builder class for WifiAwareConfig
Enums
- AttachmentFetchEventType
- The types of attachment fetch events that can be delivered to an attachment fetcher's callback.
- ConnectionRequestAuthorization
- Indicates whether a connection should be authorized.
- ConnectionType
- The type of Connection between two Ditto peers, signalling what transport is being used for it.
- DittoEncryptionErrorReason
- Identifies why a store could not be opened because of an encryption problem.
- LogLevel
- The severity of a logging event
- SupportedPlatform
- An enum covering platforms supported by the Ditto Flutter SDK
- TransactionCompletionAction
- Represents an action that completes a transaction, by either committing it or rolling it back.
- TransportCondition
- A condition reported by one of the transports configured on a Ditto peer.
- TransportConditionSource
- The transport subsystem that produced a TransportCondition.
Typedefs
- AuthenticationExpirationHandler = void Function(Ditto ditto, Duration timeUntilExpiration)
- A function that handles authentication expiration events for Ditto.
-
AuthenticationLogoutCleanupHandler
= FutureOr<
void> Function(Ditto ditto) - A function called after Authenticator.logout completes, allowing you to perform any required cleanup of the store (e.g. evicting sensitive data).
-
ConnectionRequestHandler
= Future<
ConnectionRequestAuthorization> Function(ConnectionRequest)
Exceptions / Errors
- DittoClosedException
- DittoEncryptionException
- Thrown when a store cannot be opened because of an encryption problem, such as a missing, unexpected, or incorrect encryption key.
- DittoError
- DittoException