Skip to content

Instantly share code, notes, and snippets.

@haberman
Created March 14, 2023 23:10
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 haberman/bb90f5f49f6b35bea746cda468aa7958 to your computer and use it in GitHub Desktop.
Save haberman/bb90f5f49f6b35bea746cda468aa7958 to your computer and use it in GitHub Desktop.
enchanted-aurora-9547

enchanted-aurora-9547

Created with <3 with dartpad.dev.

T create<T>(T Function(int) creator, int a) {
return creator(a);
}
class Bar {
int member;
Bar(this.member);
void doPrint() { print(member); }
}
void main() {
var bar = create(Bar.new, 5);
bar.doPrint();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment