fix: Linter warnings

This commit is contained in:
PapaTutuWawa 2022-11-08 18:06:59 +01:00
parent 8eb270365c
commit 18afdf74e6
6 changed files with 10 additions and 11 deletions

View File

@ -72,7 +72,7 @@ class XmppConnectionResult {
}
class XmppConnection {
/// [socket] is for debugging purposes.
/// [_socket] is for debugging purposes.
/// [connectionPingDuration] is the duration after which a ping will be sent to keep
/// the connection open. Defaults to 15 minutes.
XmppConnection(

View File

@ -78,7 +78,7 @@ class StanzaHandler extends Handler {
} else if (tagXmlns != null) {
return listContains(
node.children,
(XMLNode _node) => _node.attributes.containsKey('xmlns') && _node.attributes['xmlns'] == tagXmlns,
(XMLNode node_) => node_.attributes.containsKey('xmlns') && node_.attributes['xmlns'] == tagXmlns,
);
}

View File

@ -1,4 +1,3 @@
import 'package:moxlib/moxlib.dart';
import 'package:moxxmpp/src/events.dart';
import 'package:moxxmpp/src/jid.dart';
import 'package:moxxmpp/src/managers/base.dart';

View File

@ -2,7 +2,7 @@ import 'package:moxxmpp/src/namespaces.dart';
import 'package:moxxmpp/src/stringxml.dart';
class Stanza extends XMLNode {
// ignore: use_super_parameters
Stanza({ this.to, this.from, this.type, this.id, List<XMLNode> children = const [], required String tag, Map<String, String> attributes = const {} }) : super(
tag: tag,
attributes: <String, dynamic>{

View File

@ -52,7 +52,7 @@ class DataFormField {
children: [
...description != null ? [XMLNode(tag: 'desc', text: description)] : [],
...isRequired ? [XMLNode(tag: 'required')] : [],
...values.map((value) => XMLNode(tag: 'value', text: value)).toList(),
...values.map((value) => XMLNode(tag: 'value', text: value)),
...options.map((option) => option.toXml())
],
);
@ -88,14 +88,14 @@ class DataForm {
'type': type
},
children: [
...instructions.map((i) => XMLNode(tag: 'instruction', text: i)).toList(),
...instructions.map((i) => XMLNode(tag: 'instruction', text: i)),
...title != null ? [XMLNode(tag: 'title', text: title)] : [],
...fields.map((field) => field.toXml()).toList(),
...reported.map((report) => report.toXml()).toList(),
...fields.map((field) => field.toXml()),
...reported.map((report) => report.toXml()),
...items.map((item) => XMLNode(
tag: 'item',
children: item.map((i) => i.toXml()).toList(),
),).toList(),
),),
],
);
}

View File

@ -204,13 +204,13 @@ class DiscoManager extends XmppManagerBase {
}
},
children: [
...getIdentities().map((identity) => identity.toXMLNode()).toList(),
...getIdentities().map((identity) => identity.toXMLNode()),
..._features.map((feat) {
return XMLNode(
tag: 'feature',
attributes: <String, dynamic>{ 'var': feat },
);
}).toList(),
}),
],
),
],