SDKPublishLayout class

Inheritance
Annotations
  • @JsonSerializable.new()

Constructors

SDKPublishLayout({required String id, required String pageId, required String projectId, required Map<String, Map<String, BaseNode>> canvases, required DateTime lastUpdated, List<Breakpoint>? breakpoints, bool? hidden, ThemeTokens? theme, required String owner, required Set<String>? teams, required Set<String>? users, required Map<String, Role> roles, required bool? public})
Creates a new instance of SDKPublishLayout.
SDKPublishLayout.fromJson(Map<String, dynamic> json)
Creates a new instance of SDKPublishLayout from a JSON map.
factory
SDKPublishLayout.private({required String id, required String pageId, required String projectId, required Map<String, Map<String, BaseNode>> canvases, required DateTime lastUpdated, List<Breakpoint>? breakpoints, bool? hidden, ThemeTokens? theme, required PrivacyBase privacy})
Creates a new instance of SDKPublishLayout with privacy inherited from another PrivacyBase.

Properties

admins → Set<String>
An owner ID must always exist in the roles map. It's an error if it doesn't.
no setterinherited
breakpoints → List<Breakpoint>
A list of breakpoints that are used in this layout, indicating to the UI at what width the layout should change to a different canvas.
final
canvases → Map<String, Map<String, BaseNode>>
A list of the nodes that makes up this layout. CanvasID -> <NodeID -> Node>
final
canvasIds → Set<String>
Extracted canvas ids from the canvases map. This is available for convenience. Do not modify this set directly.
final
editors → List<String>
A list of user ids that are editors of this object.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hidden → bool
Returns true if the layout is hidden from Codelessly's CloudUI dashboard.
final
id → String
The layout's unique id.
final
isExpired → bool
Returns true if the layout is expired.
no setter
lastUpdated → DateTime
The last time this layout was updated. Used for cache validation.
final
owner → String
The owner of the document. The owner is the user who is responsible for the document and has the highest level of access to it. In terms of permissions, it's equivalent to the Role.admin role, however this owner is responsible for billing and other administrative tasks.
finalinherited
pageId → String
The layout's page id.
final
privacy → PrivacyBase
While this PrivacyBase object is extended by other models, calling toJson on those models will return data in addition to these core privacy properties.
no setterinherited
projectId → String
The layout's project id.
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
public → bool
Whether the object is public or not. If it is public, then it is accessible to read by anyone on the platform.
finalinherited
roles → Map<String, Role>
The roles of each user from the users set.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
teams → Set<String>
The list of teams associated with a particular document.
finalinherited
theme → ThemeTokens?
The project's theme when the layout was published, for what the runtime draws itself (dialogs, toasts). Null for layouts published before themes, which read their look from their nodes.
final
users → Set<String>
A set of user ids that are allowed to access the project in some way defined by the roles map.
finalinherited
viewers → List<String>
A list of user ids that are viewers of this object.
no setterinherited

Methods

copyWith({String? id, String? pageId, String? projectId, Map<String, Map<String, BaseNode>>? canvases, DateTime? lastUpdated, List<Breakpoint>? breakpoints, bool? hidden, ThemeTokens? theme, PrivacyBase? privacy}) → SDKPublishLayout
Creates a copy of this instance with the provided parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this instance to a JSON map.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

compressCanvases(Map<String, dynamic> json) → Map<String, dynamic>
json with its canvases gzipped into compressedCanvasesKey: a screen's layout with every breakpoint and its logic can exceed the document limit, while its JSON compresses about tenfold.
expandCompressedCanvases(Map<String, dynamic> json) → Map<String, dynamic>
json with compressedCanvasesKey expanded back into canvases.

Constants

compressedCanvasesKey → const String
The key a layout too large for one Firestore document (1 MiB) keeps its canvases under, gzipped and base64 encoded, in place of canvases.