toJson method

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

Implementation

@override
Map<String, dynamic> toJson() => <String, Object?>{
      ...super.toJson(),
      'type': type,
      'name': name ?? '',
      'owner': owner?.toJson(),
      'declaredType': declaredType?.toJson(),
      'const': isConst ?? false,
      'final': isFinal ?? false,
      'static': isStatic ?? false,
      if (location?.toJson() case final locationValue?)
        'location': locationValue,
      if (staticValue?.toJson() case final staticValueValue?)
        'staticValue': staticValueValue,
    };