TreeNode.fromJson constructor
Implementation
factory TreeNode.fromJson(Map<String, dynamic> json) {
return TreeNode(
checked: json['checked'] ?? false,
show: json['show'] ?? false,
id: json['id'] ?? 0,
pid: json['pid'] ?? 0,
commonID: json['commonID'] ?? 0,
title: json['title'] ?? '',
children: (json['children'] as List<dynamic>)
.map((childJson) => TreeNode.fromJson(childJson))
.toList(),
);
}