getColorTrait property

ColorTrait? getColorTrait

Implementation

ColorTrait? get getColorTrait {
  final color = trait<ColorTrait>();
  if (color is ColorTrait) {
    return color;
  } else {
    return null;
  }
}