push method

Push push(
  1. String eventName,
  2. Map<String, dynamic> payload, [
  3. Duration? newTimeout
])

Push a message to the Phoenix server.

Implementation

Push push(
  /// The name of the message's event.
  ///
  /// This can be any string, as long as it matches with something
  /// expected on the backend implementation.
  String eventName,

  /// The message payload.
  ///
  /// This needs to be a JSON encodable object.
  Map<String, dynamic> payload, [
  /// Manually set timeout value for this push.
  ///
  /// If not provided, the default timeout will be used.
  Duration? newTimeout,
]) =>
    pushEvent(
      PhoenixChannelEvent.custom(eventName),
      payload,
      newTimeout,
    );