Group constructor Null safety
- String name,
- String description,
- {Iterable<
String> aliases = const [], - Iterable<
GroupMixin> children = const [], - Iterable<
AbstractCheck> checks = const []}
Construct a new Group
Implementation
Group(
this.name,
this.description, {
this.aliases = const [],
Iterable<GroupMixin> children = const [],
Iterable<AbstractCheck> checks = const [],
}) {
if (!commandNameRegexp.hasMatch(name) || name != name.toLowerCase()) {
throw CommandRegistrationError('Invalid group name "$name"');
}
for (final child in children) {
addCommand(child);
}
for (final check in checks) {
super.check(check);
}
}