MqttTopic constructor
Creates a new instance of a rawTopic from a rawTopic string. rawTopic - The topic to represent. validations - The validations to run on the rawTopic.
Implementation
MqttTopic(this.rawTopic, List<dynamic> validations) {
topicFragments = rawTopic!.split(topicSeparator[0]);
// run all validations
for (final dynamic validation in validations) {
validation(this);
}
}