toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
// ignore: unnecessary_cast
  return {
    'import': import,
    'name': name,
    'isNullable': isNullable,
    'isRecordType': _isRecordType,
    'nameInRecord': nameInRecord,
    if (typeArguments.isNotEmpty)
      "typeArguments": typeArguments.map((v) => v.toJson()).toList(),
    if (otherImports?.isNotEmpty == true)
      "otherImports": otherImports?.toList(),
  } as Map<String, dynamic>;
}