toJson method
Convert to JSON-serializable map
Implementation
@override
Map<String, dynamic> toJson() => {
'nodeType': nodeType,
'offset': offset,
'length': length,
if (name != null) 'name': name!.toJson(),
'metadata': metadata.map((a) => a.toJson()).toList(),
if (returnType != null) 'returnType': returnType!.toJson(),
'isGetter': isGetter,
'isSetter': isSetter,
'isExternal': isExternal,
if (typeParameters != null) 'typeParameters': typeParameters!.toJson(),
if (functionExpression != null)
'functionExpression': functionExpression!.toJson(),
};