toJson method

Map<String, Object?> toJson()

Serialise to the wire format.

Implementation

Map<String, Object?> toJson() => <String, Object?>{
  'kind': 'branched',
  'type': type,
  'activeBranch': activeBranch,
  'branchCount': branchCount,
  'branches': <Object?>[for (final branch in branches) branch.toJson()],
};