Skip to content

Instantly share code, notes, and snippets.

@ianloic
Last active August 21, 2018 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianloic/9c61e2eea249ba9681e78ab0e9517ca7 to your computer and use it in GitHub Desktop.
Save ianloic/9c61e2eea249ba9681e78ab0e9517ca7 to your computer and use it in GitHub Desktop.
import 'dart:async';
class AsyncProxyController<T> {
}
class AsyncProxy<T> {
AsyncProxyController<T> ctrl;
}
typedef Future<V> WithProxyFunction<ProxyT, V>(ProxyT proxy);
class ProxyManager<T, ProxyT extends AsyncProxy<T>> {
Future<V> doWithProxy<V>(String fnName, WithProxyFunction<ProxyT, V> fn) {
return fn(proxy);
}
}
void main() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment