getObject<T extends MeteorSharedObject> static method
获取缓存对象 T 是继承自MeteorSharedObject类的的对象
Implementation
static Future<T?> getObject<T extends MeteorSharedObject>(
String key, T Function() constructor) async {
T instance = constructor();
Map<String, dynamic>? json = await getMap(key);
instance.setupFromJson(json);
return instance;
}