enable method

Color? enable(
  1. bool enable
)

Implementation

Color? enable(bool enable) {
  if (this == Colors.transparent) return this;
  return enable ? this : this?.withOpacity(0.5);
}