TreeNode.fromJson constructor

TreeNode.fromJson(
  1. dynamic json
)

Implementation

TreeNode.fromJson(dynamic json)
    : id = json['id'],
      title = json['title'],
      code = json['code'],
      isCheck = json['isCheck'] ?? false,
      hierarchy = json['hierarchy'] ?? 0,
      parent =
          json['parent'] != null ? TreeNode.fromJson(json['parent']) : null,
      children = (json['children'] as List<dynamic>)
          .map((child) => TreeNode.fromJson(child))
          .toList();