Background.fromJson constructor

Background.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory Background.fromJson(Map<String, dynamic> json) => Background(
      id: int.parse(json['id']),
      isDefault: json['is_default'],
      isDark: json['is_dark'],
      name: json['name'],
      document: json['document'] == null
          ? null
          : Document.fromJson(json['document']),
      type: BackgroundType.fromJson(json['type']),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );