toJson method

Map<String, dynamic> toJson()

Serialises the node to a JSON-compatible map for reports and dashboards.

Implementation

Map<String, dynamic> toJson() => {
  'type': 'logic_unit',
  'name': name,
  'role': role,
  'state': stateFields
      .map((f) => {'name': f.rawName, 'type': f.type})
      .toList(),
  'methods': methods.length,
  'notifier': isNotifier,
  'notifierType': notifierType.name,
  'isFamilyCandidate': isFamilyCandidate,
  'superClass': superClassName,
  'mixins': mixins,
};