toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() => <String, Object?>{
      ...super.toJson(),
      'type': type,
      'uri': uri ?? '',
      'library': library?.toJson(),
      if (lineOffset case final lineOffsetValue?)
        'lineOffset': lineOffsetValue,
      if (columnOffset case final columnOffsetValue?)
        'columnOffset': columnOffsetValue,
      if (source case final sourceValue?) 'source': sourceValue,
      if (tokenPosTable?.map((f) => f.toList()).toList()
          case final tokenPosTableValue?)
        'tokenPosTable': tokenPosTableValue,
    };