createFromCache<T extends MeteorSharedObject> static method

Future<T> createFromCache<T extends MeteorSharedObject>(
  1. T constructor()
)

Implementation

static Future<T> createFromCache<T extends MeteorSharedObject>(T Function() constructor) async {
  T instance = constructor();
  if (instance.initialFromCache ?? true) {
    await instance.setupFromSharedCache();
  }
  return instance;
}