RepositoryChange<T> class
A change in a repository. This is emitted through the repository's change stream.
Constructors
- RepositoryChange({required RepositoryChangeType type, T? item, String? id, String? oldId, Object? error, StackTrace? stackTrace, bool isRealtimeError = false, bool? isRetriable})
-
Creates a new repository change event.
const
- RepositoryChange.created(T item)
-
Creates a new repository change event for a created item.
factory
- RepositoryChange.deleted(String id, [T? item])
-
Creates a new repository change event for a deleted item.
factory
- RepositoryChange.error(Object error, [StackTrace? stackTrace])
-
Creates a new repository change event for an error.
factory
- RepositoryChange.idChanged(T item, String oldId, String newId)
-
Creates a new repository change event for an ID change.
factory
- RepositoryChange.realtimeError(Object error, {StackTrace? stackTrace, required bool isRetriable})
-
Creates a realtime repository change error.
factory
- RepositoryChange.updated(T item)
-
Creates a new repository change event for an updated item.
factory
Properties
- error → Object?
-
An error that occurred, if applicable
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
The ID of the item that was changed, if applicable
final
- isRealtimeError → bool
-
Whether this error came from a realtime remote watch.
final
- isRetriable → bool?
-
Whether the failed operation will be retried automatically.
final
- item → T?
-
The item that was changed, if applicable
final
- oldId → String?
-
The previous ID of the item, if the item's ID was changed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
The stack trace for the error, if applicable
final
- type → RepositoryChangeType
-
The type of change that occurred
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