Topic.fromParametr constructor

Topic.fromParametr({
  1. Type? type,
  2. List<String>? paths,
  3. String separator = '.',
})

The topic of an explicitly given type, for a type known only at runtime.

Implementation

factory Topic.fromParametr(
    {Type? type, List<String>? paths, String separator = '.'}) {
  if (type == null) {
    throw EventBusException('Topic.fromParametr required type !');
  }
  return TopicImpl('$type', paths: paths ?? [], separator: separator);
}