anchor.diff:            ..write(');');
         }
   
  -      _buffer.write('''\n    return val;
  +      buffer.write('''\n    return val;
     }''');
   
         final fieldKeyMap = Map.fromEntries(data.usedCtorParamsAndFields
  
positive.code:       args.add('disallowNullValues: $disallowNullKeyLiteral');
      }
  
      if (args.isNotEmpty) {
        _buffer.writeln('${' ' * indent}\$checkKeys(json, ${args.join(', ')});');
      }
    }
  
    String _deserializeForField(FieldElement field,
        {ParameterElement ctorParam, bool checkedProperty}) {
      checkedProperty ??= false;
      final jsonKeyName = safeNameAccess(field);
      final targetType = ctorParam?.type ?? field.type;
  
negative.code:         _deserializeForField(accessibleFields[paramOrFieldName],
              ctorParam: ctorParam);
  
      final data = _writeConstructorInvocation(
          element,
          accessibleFields.keys,
          accessibleFields.values
              .where((fe) => !fe.isFinal)
              .map((fe) => fe.name)
              .toList(),
          unavailableReasons,
          deserializeFun);
  
      final checks = _checkKeys(accessibleFields.values
          .where((fe) => data.usedCtorParamsAndFields.contains(fe.name)));
  
      if (config.checked) {
        final classLiteral = escapeDartString(element.name);
  
        buffer..write('''
    return \$checkedNew(
      $classLiteral,
      json,
      () {\n''')..write(checks)..write('''
      final val = ${data.content};''');
  
        for (final field in data.fieldsToSet) {
          buffer.writeln();
          final safeName = safeNameAccess(accessibleFields[field]);
          buffer
            ..write('''
      \$checkedConvert(json, $safeName, (v) => ''')
            ..write('val.$field = ')
  