singleton<T> static method

DataSourceCall<T>? singleton<T>(
  1. DataSourceCall<T> instance
)

Implementation

static DataSourceCall<T>? singleton<T>(DataSourceCall<T> instance) {
  var prev = _instances[instance];
  if (prev != null) return prev as DataSourceCall<T>;

  _instances[instance] = instance;
  return instance;
}