enumerateJsonGetters method Null safety

void enumerateJsonGetters(
  1. Function visitor,
  2. [dynamic scheme]
)

Implementation

void enumerateJsonGetters(Function visitor, [dynamic scheme]) {
  classMirror.declarations.values.where((DeclarationMirror dm) {
    return !dm.isPrivate &&
        dm is MethodMirror &&
        !dm.isConstructor &&
        dm.isRegularMethod &&
        dm.parameters.isEmpty &&
        getDeclarationMeta(dm, scheme) != null &&
        getDeclarationMeta(dm, scheme)!.name != null;
  }).forEach((DeclarationMirror dm) {
    visitor(dm, getDeclarationMeta(dm, scheme));
  });
}