toJson method
override
Implementation
@override
Map<String, dynamic> toJson() => <String, Object?>{
...super.toJson(),
'type': type,
'name': name ?? '',
'library': library?.toJson(),
'abstract': isAbstract ?? false,
'const': isConst ?? false,
'isSealed': isSealed ?? false,
'isMixinClass': isMixinClass ?? false,
'isBaseClass': isBaseClass ?? false,
'isInterfaceClass': isInterfaceClass ?? false,
'isFinal': isFinal ?? false,
'traceAllocations': traceAllocations ?? false,
'interfaces': interfaces?.map((f) => f.toJson()).toList(),
'fields': fields?.map((f) => f.toJson()).toList(),
'functions': functions?.map((f) => f.toJson()).toList(),
'subclasses': subclasses?.map((f) => f.toJson()).toList(),
if (location?.toJson() case final locationValue?)
'location': locationValue,
if (typeParameters?.map((f) => f.toJson()).toList()
case final typeParametersValue?)
'typeParameters': typeParametersValue,
if (error?.toJson() case final errorValue?) 'error': errorValue,
if (superClass?.toJson() case final superValue?) 'super': superValue,
if (superType?.toJson() case final superTypeValue?)
'superType': superTypeValue,
if (mixin?.toJson() case final mixinValue?) 'mixin': mixinValue,
};