SubtitleConfig class
字幕完整配置,包含样式、位置和动画设置。
聚合 SubtitleStyleConfig 样式配置与位置偏移、动画开关等布局参数, 供字幕构建器(如 DefaultSubtitleBuilder)使用。
Complete subtitle configuration including style, position, and animation.
Aggregates SubtitleStyleConfig style settings with position offset and animation parameters, consumed by subtitle builders such as DefaultSubtitleBuilder.
Constructors
- SubtitleConfig({SubtitleStyleConfig styleConfig = const SubtitleStyleConfig(), EdgeInsets position = const EdgeInsets.only(), bool enableAnimation = false, Duration animationDuration = const Duration(milliseconds: 300), Curve animationCurve = Curves.easeInOut})
-
创建字幕完整配置。
const
Properties
- animationCurve → Curve
-
字幕切换动画曲线。
final
- animationDuration → Duration
-
字幕切换动画时长。
final
- enableAnimation → bool
-
是否启用字幕切换动画。
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- position → EdgeInsets
-
字幕位置偏移。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- styleConfig → SubtitleStyleConfig
-
字幕样式配置。
final
Methods
-
copyWith(
{SubtitleStyleConfig? styleConfig, EdgeInsets? position, bool? enableAnimation, Duration? animationDuration, Curve? animationCurve}) → SubtitleConfig - 创建当前配置的副本,可选覆盖部分属性。
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited