クラスフィールドとして使用される関数の署名を指定したいと思います。以下に例を示します。
class Space<PointType>
{
// num distance(PointType, PointType); This does not work
final distance; // This works but dystance types are not defined
Space(num this.distance(PointType, PointType));
}
typedef を使用してコールバック インターフェイスを定義できることはわかっています。ただし、これはジェネリック内では機能しないようです。助言がありますか?