RemoteDelegate class abstract

Abstract class for handling remote data sources.

A delegate defines how assets, cache, and remote data should be loaded, saved, and listened to.

Constructors

RemoteDelegate()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

asset(String name, String path) Future<String>
Load JSON from asset bundle.
cache(String name, String path) Future<Map?>
Load from cache (e.g. SharedPreferences, SQLite).
changes(String name, String path) Future<void>
Lifecycle hook: when data has changed for a path.
fetch(String name, String path) Future<Map?>
Fetch data from remote source (e.g. REST, Firebase).
listen(String name, String path) Stream<Map?>
Listen for live changes (e.g. Firebase streams).
loaded() Future<void>
Lifecycle hook: after all data loaded.
loading() Future<void>
Lifecycle hook: before loading starts.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ready(String name, String path) Future<void>
Lifecycle hook: when data is ready for a path.
save(String name, String path, Map? data) Future<bool>
Save data into cache.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited