fromJson static method
Returns a new TemplatePatch instance and imports its values from
json
if it's non-null, null if json
is null.
Implementation
static TemplatePatch? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return TemplatePatch(
body: json[r'body'] == null
? null
: List<Map<String, dynamic>>.from(json[r'body']),
footer: json[r'footer'] == null
? null
: List<Map<String, dynamic>>.from(json[r'footer']),
header: json[r'header'] == null
? null
: List<Map<String, dynamic>>.from(json[r'header']),
name: json[r'name'],
type: json[r'type'],
);
}