copyWith method
StarRatingTheme
copyWith({
- ValueGetter<
Color?> ? activeColor, - ValueGetter<
Color?> ? backgroundColor, - ValueGetter<
double?> ? starSize, - ValueGetter<
double?> ? starSpacing,
Returns a copy of this theme with the given fields replaced.
Implementation
StarRatingTheme copyWith({
ValueGetter<Color?>? activeColor,
ValueGetter<Color?>? backgroundColor,
ValueGetter<double?>? starSize,
ValueGetter<double?>? starSpacing,
}) {
return StarRatingTheme(
activeColor: activeColor == null ? this.activeColor : activeColor(),
backgroundColor:
backgroundColor == null ? this.backgroundColor : backgroundColor(),
starSize: starSize == null ? this.starSize : starSize(),
starSpacing: starSpacing == null ? this.starSpacing : starSpacing(),
);
}