copyWith method

RCKVoiceStyleConfig copyWith({
  1. double? iconSize,
  2. Color? playingColor,
  3. Color? notPlayingColor,
  4. String? customPlayingIconPath,
  5. String? customNotPlayingIconPath,
  6. TextStyle? durationTextStyle,
})

创建一个新的配置,覆盖当前配置的某些属性

Implementation

RCKVoiceStyleConfig copyWith({
  double? iconSize,
  Color? playingColor,
  Color? notPlayingColor,
  String? customPlayingIconPath,
  String? customNotPlayingIconPath,
  TextStyle? durationTextStyle,
}) {
  return RCKVoiceStyleConfig(
    iconSize: iconSize ?? this.iconSize,
    playingColor: playingColor ?? this.playingColor,
    notPlayingColor: notPlayingColor ?? this.notPlayingColor,
    customPlayingIconPath:
        customPlayingIconPath ?? this.customPlayingIconPath,
    customNotPlayingIconPath:
        customNotPlayingIconPath ?? this.customNotPlayingIconPath,
    durationTextStyle: durationTextStyle ?? this.durationTextStyle,
  );
}