DataStoreHubEvent class
DataStore periodically publishes state notifications onto Amplify's Hub. You can subscribe to the Hub to gain insight into the internal state of the DataStore.
The following example shows how to listen to DataStore Hub events:
Amplify.Hub.listen(HubChannel.DataStore, (msg) {
if (msg.type == DataStoreHubType.ready) {
print('DataStore is ready!');
}
print(msg);
});
- Inheritance
-
- Object
- HubEvent<
DataStoreHubEventPayload> - DataStoreHubEvent
Constructors
- DataStoreHubEvent(String eventName, {required DataStoreHubEventType type, DataStoreHubEventPayload? payload})
- DataStore periodically publishes state notifications onto Amplify's Hub. You can subscribe to the Hub to gain insight into the internal state of the DataStore.
Properties
- eventName → String
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- payload → DataStoreHubEventPayload?
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → DataStoreHubEventType
-
The type of the DataStore Hub event.
final
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