hasTrait<T extends Trait<Object>> method

bool hasTrait<T extends Trait<Object>>()

Whether the shape has a trait of type T.

Implementation

bool hasTrait<T extends Trait>() => values.any((t) => t is T);