PusherChannelsOptions class abstract mixin

Options passed to instances of PusherChannelsClient.

  • Use PusherChannelsOptions.fromCluster if your url has a pattern like: {scheme}://ws-{cluster_name}.{host}:{port}/app/{key}.

    Example:

    const testOptions = PusherChannelsOptions.fromCluster(
       scheme: 'wss',
       cluster: 'mt1',
       key: 'a0173cd5499b34d93109',
       port: 443,
     );
    
  • Use PusherChannelsOptions.fromHost if you have the Pusher Channels installed to your server under your own domain host.

    Example:

    const testOptions = PusherChannelsOptions.fromHost(
      scheme: 'wss',
      host: 'my.domain.com',
      key: 'my_key',
    );
    
  • Use PusherChannelsOptions.custom, if the all above use-cases don't suit yours, providing PusherChannelsOptionsCustomUriResolver.

    Example:

    final testOptions = PusherChannelsOptions.custom(
      uriResolver: (_) => Uri.parse('https://my.domain.com/my/path')
    );
    
Annotations
  • @immutable

Constructors

PusherChannelsOptions.custom({required PusherChannelsOptionsCustomUriResolver uriResolver, PusherChannelsOptionsMetadata metadata})
Using this constructor you can set your custom Uri providing uriResolver.
const
factory
PusherChannelsOptions.fromCluster({required String scheme, required String cluster, required String key, bool shouldSupplyMetadataQueries, String host, int? port, PusherChannelsOptionsMetadata metadata})
Use this if your url has a pattern like: {scheme}://ws-{cluster_name}.{host}:{port}/app/{key}.
const
factory
PusherChannelsOptions.fromHost({required String scheme, required String host, required String key, int? port, bool shouldSupplyMetadataQueries, PusherChannelsOptionsMetadata metadata})
Use this if you have the Pusher Channels installed to your server under your own domain host and the url pattern looks like:
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
A resultant url used to connect by PusherChannelsClient
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited