SleepStageStyle constructor

SleepStageStyle({
  1. List<Color>? gradientColor,
  2. Color? color,
  3. required SleepStageStyleValue value,
})

Implementation

SleepStageStyle({
  this.gradientColor,
  this.color,
  required this.value,
}) : assert(
  (gradientColor != null && color == null) ||
  (gradientColor == null && color != null),
  '必须提供gradientColor或color其中之一,但不能同时提供两者'
);