getPublicSettersFrom function

Map<String, DeclarationMirror?>? getPublicSettersFrom(
  1. ClassMirror classMirror
)

Get the list of public variables DeclarationMirror and setters from classMirror

Implementation

Map<String, DeclarationMirror?>? getPublicSettersFrom(ClassMirror classMirror) =>
    classMirror.setters?.fold(<String, DeclarationMirror?>{},
        (publicSetters, setter) {
      if (!setter.startsWith('_'))
        publicSetters?[setter] = classMirror.fields?[setter];
      return publicSetters;
    });