copyWith method

PlayerControlsTheme copyWith({
  1. Color? primaryColor,
  2. Color? backgroundColor,
  3. Color? iconColor,
  4. Color? textColor,
  5. Color? progressBarColor,
  6. Color? progressBarBackgroundColor,
  7. double? mainIconSize,
  8. double? secondaryIconSize,
  9. double? progressBarHeight,
  10. double? borderRadius,
  11. TextStyle? timeTextStyle,
  12. TextStyle? buttonTextStyle,
  13. bool? autoHideControls,
  14. Duration? autoHideDuration,
  15. Duration? animationDuration,
  16. double? controlsBackgroundOpacity,
})

Copy with modifications

Implementation

PlayerControlsTheme copyWith({
  Color? primaryColor,
  Color? backgroundColor,
  Color? iconColor,
  Color? textColor,
  Color? progressBarColor,
  Color? progressBarBackgroundColor,
  double? mainIconSize,
  double? secondaryIconSize,
  double? progressBarHeight,
  double? borderRadius,
  TextStyle? timeTextStyle,
  TextStyle? buttonTextStyle,
  bool? autoHideControls,
  Duration? autoHideDuration,
  Duration? animationDuration,
  double? controlsBackgroundOpacity,
}) {
  return PlayerControlsTheme(
    primaryColor: primaryColor ?? this.primaryColor,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    iconColor: iconColor ?? this.iconColor,
    textColor: textColor ?? this.textColor,
    progressBarColor: progressBarColor ?? this.progressBarColor,
    progressBarBackgroundColor: progressBarBackgroundColor ?? this.progressBarBackgroundColor,
    mainIconSize: mainIconSize ?? this.mainIconSize,
    secondaryIconSize: secondaryIconSize ?? this.secondaryIconSize,
    progressBarHeight: progressBarHeight ?? this.progressBarHeight,
    borderRadius: borderRadius ?? this.borderRadius,
    timeTextStyle: timeTextStyle ?? this.timeTextStyle,
    buttonTextStyle: buttonTextStyle ?? this.buttonTextStyle,
    autoHideControls: autoHideControls ?? this.autoHideControls,
    autoHideDuration: autoHideDuration ?? this.autoHideDuration,
    animationDuration: animationDuration ?? this.animationDuration,
    controlsBackgroundOpacity: controlsBackgroundOpacity ?? this.controlsBackgroundOpacity,
  );
}