copyWith method

Subtitle copyWith({
  1. int? index,
  2. String? text,
})

创建当前字幕的副本,可选覆盖部分属性。

Creates a copy of this subtitle with optionally overridden properties.

Implementation

Subtitle copyWith({
  int? index,
  String? text,
}) {
  return Subtitle(
    index: index ?? this.index,
    text: text ?? this.text,
  );
}