# block method

Future <bool> block(

1. List <String> items

)

## Implementation

    Future<bool> block(List<String> items) async {
      final result = (await getAttributes().sendStanza(
        StanzaDetails(
          Stanza.iq(
            type: 'set',
            children: [
              XMLNode.xmlns(
                tag: 'block',
                xmlns: blockingXmlns,
                children: items.map((item) {
                  return XMLNode(
                    tag: 'item',
                    attributes: {
                      'jid': item,
                    },
                  );
                }).toList(),
              ),
            ],
          ),
        ),
      ))!;

      return result.attributes['type'] == 'result';
    }