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