setup method
Initialize your Model Data Here
Implementation
Future<void> setup() async {
Map<String, T> result = {};
List<CacheObject> cache = await CacheHandler.getCacheList(getCacheId());
for (CacheObject cacheObject in cache) {
T? tmp = createModel(cacheObject.getData());
if (tmp != null) {
result[tmp.getId()] = tmp;
}
}
setModels(result);
}