typedef FuncType = Function(); class Key { final FuncType f; const Key(this.f); } someFunc() {} const someKey = Key(someFunc);