initialize method
- @mustCallSuper
- {bool? remote,
- required Map<
String, RemoteAdapter< DataModelMixin>> adapters}
Initializes this Repository
. Nothing will work without this.
In standard scenarios this initialization is done by the framework.
Implementation
@mustCallSuper
FutureOr<Repository<T>> initialize(
{bool? remote, required Map<String, RemoteAdapter> adapters}) async {
if (isInitialized) return this;
_adapters.addAll(adapters);
await remoteAdapter.initialize(
remote: remote,
adapters: adapters,
ref: _ref,
);
_isInit = true;
return this;
}