hasConstructorMeta method Null safety

JsonConstructor? hasConstructorMeta(
  1. DeclarationMirror dm,
  2. [dynamic scheme]
)

Implementation

JsonConstructor? hasConstructorMeta(DeclarationMirror dm, [dynamic scheme]) =>
    lookupDeclarationMetaData(dm).firstWhereOrNull((m) =>
        (m is JsonConstructor &&
            ((scheme != null && m.scheme == scheme) ||
                (scheme == null && m.scheme == null)))) as JsonConstructor?;