AmplifyHub class abstract

Amplify Hub provides realtime notifications to events in the different categories.

Use listen to subscribe to a HubChannel.

Implemented types

Constructors

AmplifyHub()
Amplify Hub provides realtime notifications to events in the different categories.
factory
AmplifyHub.protected()
Amplify Hub provides realtime notifications to events in the different categories.

Properties

availableStreams Map<HubChannel<Object?, HubEvent<Object?>>, Stream<HubEvent<Object?>>>
The available streams for listening.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addChannel<HubEventPayload, E extends HubEvent<HubEventPayload>>(HubChannel<HubEventPayload, E> channel, Stream<E> stream) → void
Adds a Hub channel with the given stream.
close() → void
Resets the Hub by cancelling subscriptions and clearing registered streams.
override
listen<HubEventPayload, E extends HubEvent<HubEventPayload>>(HubChannel<HubEventPayload, E> channel, HubEventListener<E> listener, {Function? onError}) StreamSubscription<E>
Listens to the Hub channel for events produced from all plugins in the channel's categories.
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