EventTopicImpl.create constructor

EventTopicImpl.create({
  1. Type? type,
  2. String? nameType,
  3. String target = _targetDefault,
  4. String? path,
  5. String? fragment,
  6. String shema = _shema,
  7. Map<String, String>? arguments,
})

Must required type or nameType

Implementation

EventTopicImpl.create(
    {Type? type,
    String? nameType,
    String target = _targetDefault,
    String? path,
    String? fragment,
    String shema = _shema,
    Map<String, String>? arguments}) {
  if (type == null && nameType == null) {
    throw Exception('Topic.create required type or nameType !');
  }
  _uri = Uri(
      scheme: shema,
      host: '$target.${'${type ?? nameType}'.replaceAll("?", "^")}',
      path: path,
      fragment: fragment,
      queryParameters: arguments);
}