DataProviderResult<T>.found constructor

DataProviderResult<T>.found(
  1. T data, {
  2. DateTime? lastModified,
  3. String? etag,
  4. List<String> cacheTags = const [],
})

Successful result containing typed data.

Implementation

factory DataProviderResult.found(
  T data, {
  DateTime? lastModified,
  String? etag,
  List<String> cacheTags = const [],
}) {
  return DataProviderResult(
    data: data,
    lastModified: lastModified,
    etag: etag,
    isFound: true,
    isDeleted: false,
    cacheTags: cacheTags,
  );
}