Topic class

Provides the base implementation of an MQTT topic.

Implementers

Constructors

Topic(String rawTopic, List validations)
Creates a new instance of a rawTopic from a rawTopic string. rawTopic - The topic to represent. validations - The validations to run on the rawTopic.

Properties

hashCode int
Serves as a hash function for a topics.
read-only, override
hasWildcards bool
Returns true if there are any wildcards in the specified rawTopic, otherwise false.
read-only
rawTopic String
Raw topic
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
topicFragments List<String>
Topic fragments
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a String representation of the topic.
override

Operators

operator ==(Object other) bool
Checks if one topic equals another topic exactly.
override

Static Methods

validateMaxLength(Topic topicInstance) → void
Validates that the topic does not exceed the maximum length. topicInstance - The instance to check.
validateMinLength(Topic topicInstance) → void
Validates that the topic does not fall below the minimum length. topicInstance - The instance to check.

Constants

maxTopicLength → const int
Topic length
65535
multiWildcard → const String
Multi wildcard
'#'
multiWildcardValidEnd → const String
Multi wildcard end
topicSeparator + multiWildcard
topicSeparator → const String
Separator
'/'
wildcard → const String
Wildcard
'+'