trait<T extends Trait> method

Trait? trait<T extends Trait>()

Implementation

sdk.Trait? trait<T extends sdk.Trait>() {
  return deviceDetail?.traits.firstWhere((trait) => trait is T,
      orElse: () => sdk.UnknownTrait(displayName));
}