Template class

Constructors

Template.new({String? id, TemplateObjectEnum? object, String? instanceId, String? resourceType, String? templateType, String? name, String? slug, int? position, bool? canRevert, bool? canDelete, bool? canToggle, String? subject, String? markup, String? body, List<String> availableVariables = const [], List<String> requiredVariables = const [], String? fromEmailName, String? replyToEmailName, bool? deliveredByClerk, bool? enabled, int? updatedAt, int? createdAt})
Returns a new Template instance.

Properties

availableVariables List<String>
list of variables that are available for use in the template body
getter/setter pair
body String?
the template body before variable interpolation
getter/setter pair
canDelete bool?
whether this template can be deleted
getter/setter pair
canRevert bool?
whether this template can be reverted to the corresponding system default
getter/setter pair
canToggle bool?
whether this template can be enabled or disabled, true only for notification SMS templates
getter/setter pair
createdAt int?
Unix timestamp of creation.
getter/setter pair
deliveredByClerk bool?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
enabled bool?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
fromEmailName String?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id String?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
instanceId String?
the id of the instance the template belongs to
getter/setter pair
markup String?
the editor markup used to generate the body of the template
getter/setter pair
name String?
user-friendly name of the template
getter/setter pair
object TemplateObjectEnum?
String representing the object's type. Objects of the same type share the same value.
getter/setter pair
position int?
position with the listing of templates
getter/setter pair
replyToEmailName String?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
requiredVariables List<String>
list of variables that must be contained in the template body
getter/setter pair
resourceType String?
whether this is a system (default) or user overridden) template
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slug String?
machine-friendly name of the template
getter/setter pair
subject String?
email subject
getter/setter pair
templateType String?
whether this is an email or SMS template
getter/setter pair
updatedAt int?
Unix timestamp of last update.
getter/setter pair

Methods

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.
override

Operators

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

Static Methods

fromJson(dynamic value) Template?
Returns a new Template instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<Template>
mapFromJson(dynamic json) Map<String, Template>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<Template>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.