CanvasModel class

Constructors

CanvasModel({required String canvasId, required String conversationKey, String? title, Map<String, dynamic> metadata = const {}, String metadataActorDeviceKey = '', String metadataHlcTimestamp = '', String metadataSignature = ''})
CanvasModel.fromJson(Json json)
factory

Properties

canvasId String
final
conversationKey String
final
displayTitle String
no setter
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, dynamic>
final
metadataActorDeviceKey String
final
metadataHlcTimestamp String
final
metadataSignature String
final
metadataUpdatedAt DateTime?
Physical timestamp component of the latest signed metadata update.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String?
final

Methods

copyWith({String? canvasId, String? conversationKey, String? title, Map<String, dynamic>? metadata, String? metadataActorDeviceKey, String? metadataHlcTimestamp, String? metadataSignature}) CanvasModel
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getMetadataMessage({required String canvasId, required String conversationKey, required String actorDeviceKey, required String hlcTimestamp, required String metadataDigest}) String
Builds the canonical signed message for a canvas metadata clock.
metadataDigestFor(String metadataJson) Future<String>
SHA-256 of the canonical metadata JSON encoding.
signMetadata({required String canvasId, required String conversationKey, required String hlcTimestamp, required String metadataJson}) Future<String>
Signs a metadata clock with the current device's signing key.
verifyMetadata({required String canvasId, required String conversationKey, required String actorDeviceKey, required String hlcTimestamp, required String metadataJson, required String signature}) Future<bool>
Verifies the metadata signature against the supplied JSON metadata value.

Constants

defaultCanvasId → const String
titleMetadataKey → const String