Skip to content

Instantly share code, notes, and snippets.

@gazialankus
Created May 13, 2019 07:21
Show Gist options
  • Save gazialankus/8e054e39063362a360f1b376ab4d6f95 to your computer and use it in GitHub Desktop.
Save gazialankus/8e054e39063362a360f1b376ab4d6f95 to your computer and use it in GitHub Desktop.
typedef bool GeneticFunction<T>(T geneticData, String key);
class Component<T> {
Component({this.geneticFunc});
final GeneticFunction<T> geneticFunc;
}
class CoolType {}
void main() {
Component<CoolType>(
geneticFunc: (CoolType cool, String keyword){
return false;
},
);
Component<CoolType>(
geneticFunc: (dynamic cool, String keyword){
return false;
},
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment