ApiCacheCodec<T> class
Turns an answer into text that can be saved, and back.
Constructors
- ApiCacheCodec({required String encode(T value), required T decode(String data)})
-
const
Properties
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
Static Properties
-
text
→ ApiCacheCodec<
String> -
For answers that are text already, saved exactly as received.
final
Static Methods
-
json<
T> () → ApiCacheCodec< T> - For answers that are already JSON-shaped.