matrix library

Matrix SDK written in pure Dart.

Classes

AlgorithmTypes
ArchivedRoom
AssertedIdentity
MSC3086: Asserted identity on VoIP calls https://github.com/matrix-org/matrix-doc/pull/3086
AuthenticationData
AuthenticationFlow
For each endpoint, a server offers one or more 'flows' that the client can use to authenticate itself. Each flow comprises a series of stages
AuthenticationIdentifier
AuthenticationIdentifierTypes
AuthenticationPassword
AuthenticationPhoneIdentifier
AuthenticationRecaptcha
AuthenticationThirdPartyIdentifier
AuthenticationThreePidCreds
For email based identity: https://matrix.org/docs/spec/client_server/r0.6.1#email-based-identity-homeserver Or phone number based identity: https://matrix.org/docs/spec/client_server/r0.6.1#phone-number-msisdn-based-identity-homeserver
AuthenticationToken
AuthenticationTypes
AuthenticationUserIdentifier
BasicEvent
BasicEventWithSender
BasicRoomEvent
CachedPresence
CallCapabilities
https://github.com/matrix-org/matrix-doc/blob/dbkr/msc2747/proposals/2747-voip-call-transfer.md#capability-advertisment https://github.com/matrix-org/matrix-doc/blob/dbkr/msc2746/proposals/2746-reliable-voip.md#add-dtmf
CallErrorCode
CallOptions
Initialization parameters of the call session.
CallReplaces
MSC2747: VoIP call transfers https://github.com/matrix-org/matrix-doc/pull/2747
CallReplacesTarget
CallSession
A call session object
CallTimeouts
Capabilities
Categories
ChangePasswordCapability
ChildRoomsChunk
CiphertextInfo
ClaimKeysResponse
Client
Represents a Matrix client to communicate with a Matrix homeserver and is the entry point for this SDK.
CommandArgs
ConnectionInfo
ConnectionTester
CrossSigningKey
CuteEventContent
DatabaseApi
Device
A client device
DeviceInfo
DeviceKeys
DeviceKeysList
DeviceListsUpdate
DiscoveryInformation
Used by clients to determine the homeserver, identity server, and other optional components they should be interacting with.
EncryptedFile
EvaluatedPushRuleAction
Event
All data exchanged over Matrix is expressed as an "event". Typically each client action (e.g. sending a message) correlates with exactly one event.
EventContext
The events and state surrounding the requested event.
EventFilter
EventTypes
EventUpdate
Represents a new event (e.g. a message in a room) or an update for an already known event.
FamedlySdkHiveDatabase
This is a basic database for the Matrix SDK using the hive store. You need to make sure that you perform Hive.init() or Hive.flutterInit() before you use this.
FieldType
Definition of valid values for a field.
Filter
FixedTimeoutHttpClient
ForwardedRoomKeyContent
GetEventByTimestampResponse
GetEventsResponse
GetKeysChangesResponse
GetNotificationsResponse
GetPresenceResponse
GetPublicRoomsResponse
A list of the rooms on the server.
GetRelatingEventsResponse
GetRelatingEventsWithRelTypeAndEventTypeResponse
GetRelatingEventsWithRelTypeResponse
GetRoomEventsResponse
A list of messages with a new token to request more.
GetRoomIdByAliasResponse
GetRoomKeysVersionCurrentResponse
GetRoomKeysVersionResponse
GetSpaceHierarchyResponse
GetThreadRootsResponse
GetUrlPreviewResponse
GetVersionsResponse
Group
Configuration for group.
GroupCall
GroupCallErrorCode
GroupCallEvent
GroupCallIntent
TODO(@duan): Need to add voice activity detection mechanism const int SPEAKING_THRESHOLD = -60; // dB
GroupCallState
GroupCallTerminationReason
GroupCallType
Groupings
GroupValue
The results for a particular group value.
HiveCollectionsDatabase
This database does not support file caching!
HomeserverInformation
ICallHandlers
IdentityServerInformation
IGroupCallRoomMemberCallState
IGroupCallRoomMemberDevice
IGroupCallRoomMemberFeed
IGroupCallRoomMemberState
ImagePackContent
ImagePackImageContent
ImagePackPackContent
IncludeEventContext
Invite3pid
InvitedRoomUpdate
ISendEventResponse
JoinedRoomUpdate
KeyBackupData
The key data
LatestReceiptState
LatestReceiptStateData
LatestReceiptStateForTimeline
LeftRoomUpdate
Location
LogEvent
LoginFlow
LoginResponse
Logs
MatrixApi
MatrixAudioFile
MatrixCrossSigningKey
MatrixDefaultLocalizations
MatrixDeviceKeys
MatrixEvent
MatrixFile
MatrixIdentifierStringExtensionResults
MatrixImageFile
MatrixImageFileResizeArguments
MatrixImageFileResizedResponse
MatrixLocalizations
MatrixSdkDatabase
Database based on SQlite3 on native and IndexedDB on web. For native you have to pass a Database object, which can be created with the sqflite package like this:
MatrixSignableKey
MatrixVideoFile
MatrixWidget
MessageTypes
MultiKey
NativeImplementations
provides native implementations for demanding arithmetic operations in order to prevent the UI from blocking
NativeImplementationsDummy
NativeImplementationsIsolate
a NativeImplementations based on Flutter's compute function
NativeImplementationsWebWorker
Notification
OlmPlaintextPayload
OpenIdCredentials
PassphraseInfo
PeekEventsResponse
Presence
PresenceContent
Profile
ProfileInformation
Protocol
ProtocolInstance
PublicRoomQueryFilter
PublicRoomsChunk
PushCondition
Pusher
PusherData
PusherId
PushNotification
Push Notification object from https://spec.matrix.org/v1.2/push-gateway-api/
PushNotificationCounts
PushNotificationDevice
PushRule
PushRuleAction
PushruleEvaluator
PushRuleSet
QueryKeysResponse
QueryPublicRoomsResponse
A list of the rooms on the server.
Receipt
Represents a receipt. This user has read an event at the given time.
ReceiptData
ReceiptEventContent
RefreshResponse
RegisterResponse
RelationshipTypes
RequestedKeyInfo
RequestTokenResponse
Result
The result object.
ResultCategories
ResultRoomEvents
Room
Represents a Matrix room.
RoomCreationTypes
RoomEncryptedContent
RoomEncryptionContent
RoomEventFilter
RoomEventsCriteria
RoomFilter
RoomKeyBackup
The backed up keys for a room.
RoomKeyContent
RoomKeyRequestContent
RoomKeys
RoomKeysUpdateResponse
RoomMember
RoomSummary
RoomsUpdate
RoomVersionsCapability
SdkError
SDPStreamMetadata
SDPStreamMetadataPurpose
SDPStreamPurpose
MSC3077: Support for multi-stream VoIP https://github.com/matrix-org/matrix-doc/pull/3077
SearchFilter
SearchResults
SearchResultsEventContext
SearchUserDirectoryResponse
SecretStorageDefaultKeyContent
SecretStorageKeyContent
ServerConfig
SessionInfo
SignableKey
SimpleSignableKey
SpaceRoomsChunk
SQfLiteEncryptionHelper
A helper utility for SQfLite related encryption operations
StateEvent
StateFilter
StrippedStateEvent
SyncRoomUpdate
SyncStatusUpdate
SyncUpdate
Tag
TagType
ThirdPartyIdentifier
ThirdPartySigned
A signature of an m.third_party_invite token to prove that this user owns a third party identity which has been invited to the room.
ThirdPartyUser
ThreePidCredentials
ThreepidCreds
Timeline
Represents the timeline of a room. The callback onUpdate will be triggered automatically. The initial event list will be retreived when created by the room.getTimeline() method.
TimelineUpdate
TimeoutHttpClient
Http Client that enforces a timeout on requests. Timeout calculation is done in a subclass.
ToDeviceEvent
ToDeviceEventDecryptionError
TokenOwnerInfo
TombstoneContent
TryGet
TupleKey
TurnServerCredentials
Tweaks
UiaRequest<T>
Wrapper to handle User interactive authentication requests
UnreadNotificationCounts
User
Represents a Matrix User which may be a participant in a Matrix Room.
UserProfile
VoIP
WebRTCDelegate
Delegate WebRTC basic functionality.
WhoIsInfo
WrappedMediaStream
Wrapped MediaStream, used to adapt Widget to display

Extensions

AccountKindEnhancedEnum on AccountKind
AccountKindFromStringExtension on Iterable<AccountKind>
BackupAlgorithmEnhancedEnum on BackupAlgorithm
BackupAlgorithmFromStringExtension on Iterable<BackupAlgorithm>
CommandsClientExtension on Client
CreateRoomPresetEnhancedEnum on CreateRoomPreset
CreateRoomPresetFromStringExtension on Iterable<CreateRoomPreset>
DehydratedDeviceHandler on Client
DirectionEnhancedEnum on Direction
DirectionFromStringExtension on Iterable<Direction>
EventFormatEnhancedEnum on EventFormat
EventFormatFromStringExtension on Iterable<EventFormat>
EventStatusExtension on EventStatus
FilterMap on Map<K, V>
ForwardedRoomKeyContentBasicEventExtension on BasicEvent
FromHiveKeyExtension on String
GroupCallUtils on Room
GroupKeyEnhancedEnum on GroupKey
GroupKeyFromStringExtension on Iterable<GroupKey>
GuestAccessDisplayString on GuestAccess
GuestAccessExtension on GuestAccess
HistoryVisibilityDisplayString on HistoryVisibility
HistoryVisibilityExtension on HistoryVisibility
HiveKeyExtension on String
IdServerUnbindResultEnhancedEnum on IdServerUnbindResult
IdServerUnbindResultFromStringExtension on Iterable<IdServerUnbindResult>
ImagePackContentBasicEventExtension on BasicEvent
ImagePackRoomExtension on Room
IncludeEnhancedEnum on Include
IncludeFromStringExtension on Iterable<Include>
JoinRulesDisplayString on JoinRules
KeyKindEnhancedEnum on KeyKind
KeyKindFromStringExtension on Iterable<KeyKind>
LoginTypeEnhancedEnum on LoginType
LoginTypeFromStringExtension on Iterable<LoginType>
MapCopyExtension on Map<String, Object?>
MatrixIdExtension on String
MatrixWidgets on Room
MembershipEnhancedEnum on Membership
MembershipFromStringExtension on Iterable<Membership>
MethodEnhancedEnum on Method
MethodFromStringExtension on Iterable<Method>
MxcUriExtension on Uri
PresenceTypeEnhancedEnum on PresenceType
PresenceTypeFromStringExtension on Iterable<PresenceType>
PushRuleKindEnhancedEnum on PushRuleKind
PushRuleKindFromStringExtension on Iterable<PushRuleKind>
ReceiptTypeEnhancedEnum on ReceiptType
ReceiptTypeFromStringExtension on Iterable<ReceiptType>
RecentEmojiExtension on Client
Syncs recent emojis in account data
RoomEncryptedContentBasicEventExtension on BasicEvent
RoomEncryptionContentBasicEventExtension on BasicEvent
RoomKeyContentBasicEventExtension on BasicEvent
RoomKeyRequestContentBasicEventExtension on BasicEvent
RoomMemberChangeTypeExtension on Event
RoomVersionAvailableEnhancedEnum on RoomVersionAvailable
RoomVersionAvailableFromStringExtension on Iterable<RoomVersionAvailable>
RTCIceCandidateExt on RTCIceCandidate
SearchOrderEnhancedEnum on SearchOrder
SearchOrderFromStringExtension on Iterable<SearchOrder>
SecretStorageDefaultKeyContentBasicEventExtension on BasicEvent
SecretStorageKeyContentBasicEventExtension on BasicEvent
SyncUpdateFilters on SyncUpdate
This extension adds easy-to-use filters for the sync update, meant to be used on the client.onSync stream, e.g. client.onSync.stream.where((s) => s.hasRoomUpdate). Multiple filters can easily be combind with boolean logic: client.onSync.stream.where((s) => s.hasRoomUpdate || s.hasPresenceUpdate)
ThirdPartyIdentifierMediumEnhancedEnum on ThirdPartyIdentifierMedium
ThirdPartyIdentifierMediumFromStringExtension on Iterable<ThirdPartyIdentifierMedium>
ToMatrixFile on EncryptedFile
TombstoneContentBasicEventExtension on BasicEvent
TrailingSlash on Uri
TryGetMapExtension on Map<String, Object?>
UiaLogin on Client
VisibilityEnhancedEnum on Visibility
VisibilityFromStringExtension on Iterable<Visibility>

Constants

emptyRoomName → const String
fileSendingStatusKey → const String
maxLength → const int
maxPDUSize → const int
max PDU size for server to accept the event with some buffer incase the server adds unsigned data f.ex age https://spec.matrix.org/v1.9/client-server-api/#size-limits
messageSendingStatusKey → const String
sdpStreamMetadataKey → const String
validSigils → const Set<String>
voipProtoVersion → const String
https://github.com/matrix-org/matrix-doc/pull/2746 version 1

Functions

convertToJson(Map map) Map<String, dynamic>
Hive always gives back an _InternalLinkedHasMap<dynamic, dynamic>. This creates a deep copy of the json and makes sure that the format is always Map<String, dynamic>.
decryptFileImplementation(EncryptedFile input) Future<Uint8List?>
you would likely want to use NativeImplementations and Client.nativeImplementations instead
encryptFile(Uint8List input) Future<EncryptedFile>
eventStatusFromInt(int intValue) EventStatus
Returns EventStatusEnum value from intValue.
genCallID() String
hasAudioDevice() Future<bool>
hasVideoDevice() Future<bool>
imagePackUsageFromJson(List<String>? json) List<ImagePackUsage>?
imagePackUsageToJson(List<ImagePackUsage>? usage, List<String>? prevUsage) List<String>
latestEventStatus(EventStatus status1, EventStatus status2) EventStatus
Takes two EventStatus values and returns the one with higher (better in terms of message sending) status.
replaceStream(StreamedResponse base, Stream<List<int>> stream) → StreamedResponse
roomAliasFromRoomName(String roomName) String
setTracksEnabled(List<MediaStreamTrack> tracks, bool enabled) → void
startWebWorker() Future<void>
CAUTION: THIS FILE NEEDS TO BE MANUALLY COMPILED
stopMediaStream(MediaStream? stream) Future<void>

Typedefs

RoomSorter = int Function(Room a, Room b)
WebWorkerStackTraceCallback = FutureOr<StackTrace> Function(String obfuscatedStackTrace)
converts a stringifyed, obfuscated StackTrace into a StackTrace