setHandler<T> abstract method

void setHandler<T>({
  1. T? initialData,
  2. @Deprecated('Use initialData') T? initalData,
  3. String? path,
  4. String? target,
  5. required Handler<T> handler,
})

Sets a handler for a specific topic. If initialData is provided, it will be used as the initial data for the topic.

Implementation

void setHandler<T>({
  T? initialData,
  @Deprecated('Use initialData') T? initalData,
  String? path,
  String? target,
  required Handler<T> handler,
});