DataProviderResult<T> class
The result returned by a MetaMantleDataProvider.
Constructors
-
DataProviderResult({T? data, DateTime? lastModified, String? etag, bool isFound = true, bool isDeleted = false, List<
String> cacheTags = const []}) -
const
-
DataProviderResult.found(T data, {DateTime? lastModified, String? etag, List<
String> cacheTags = const []}) -
Successful result containing typed data.
factory
-
DataProviderResult.gone({List<
String> cacheTags = const []}) -
Permanently removed record result (HTTP 410 Gone).
factory
-
DataProviderResult.notFound({List<
String> cacheTags = const []}) -
Missing record result (HTTP 404 Not Found).
factory
Properties
-
cacheTags
→ List<
String> -
Semantic tags for invalidation (e.g.
['products', 'category:rice']).final - data → T?
-
The loaded typed entity, or
nullif missing or deleted.final - etag → String?
-
Content hash or database version identifier for HTTP ETag calculation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDeleted → bool
-
Whether the resource has been permanently deleted (supporting HTTP 410).
final
- isFound → bool
-
Whether the target record exists.
final
- lastModified → DateTime?
-
Reliable last update timestamp from the database or source.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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