getAllDeclarationMeta method Null safety

List<JsonProperty> getAllDeclarationMeta(
  1. DeclarationMirror dm,
  2. [dynamic scheme]
)

Implementation

List<JsonProperty> getAllDeclarationMeta(DeclarationMirror dm,
        [dynamic scheme]) =>
    lookupDeclarationMetaData(dm)
        .where((m) => (m is JsonProperty &&
            ((scheme != null && m.scheme == scheme) ||
                (scheme == null && m.scheme == null))))
        .toList()
        .cast<JsonProperty>();