init method
Pre-initializes the data, so that it is accessible synchronously.
Implementation
Future<void> init() async {
await _guard.protect(() async {
if (_initialized) {
return;
}
for (var e in await all()) {
data[e.userId] = e;
}
_initialized = true;
});
}