SubtitleConfig constructor

const SubtitleConfig({
  1. SubtitleStyleConfig styleConfig = const SubtitleStyleConfig(),
  2. EdgeInsets position = const EdgeInsets.only(),
  3. bool enableAnimation = false,
  4. Duration animationDuration = const Duration(milliseconds: 300),
  5. Curve animationCurve = Curves.easeInOut,
})

创建字幕完整配置。

Creates a complete subtitle configuration.

  • styleConfig 字幕样式配置。 The subtitle style configuration.
  • position 字幕位置偏移。 The subtitle position offset.
  • enableAnimation 是否启用字幕切换动画。 Whether to enable subtitle switching animation.
  • animationDuration 字幕切换动画时长。 The duration of the subtitle switching animation.
  • animationCurve 字幕切换动画曲线。 The curve of the subtitle switching animation.

Implementation

const SubtitleConfig({
  this.styleConfig = const SubtitleStyleConfig(),
  this.position = const EdgeInsets.only(),
  this.enableAnimation = false,
  this.animationDuration = const Duration(milliseconds: 300),
  this.animationCurve = Curves.easeInOut,
});