MemoryDataProvider<T> class
An in-memory implementation of MetaMantleDataProvider ideal for testing, prototypes, and local development.
- Implemented types
Constructors
- MemoryDataProvider({String lookupParam = 'slug', Duration? simulatedLatency, bool shouldThrowError = false})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- lookupParam → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldThrowError → bool
-
final
- simulatedLatency → Duration?
-
final
Methods
-
clear(
) → void - Clears all stored records.
-
load(
RouteDataContext context) → Future< DataProviderResult< T> > -
Loads typed data for the given
context.override -
markGone(
String key, {List< String> cacheTags = const []}) → void - Marks a record as deleted or permanently gone.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String key) → void - Completely removes a record from the in-memory store.
-
set(
String key, T data, {DateTime? lastModified, String? etag, List< String> cacheTags = const []}) → void - Inserts or updates a record.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited