SubtitleStyleConfig constructor
const
SubtitleStyleConfig({
- TextStyle textStyle = const TextStyle(fontSize: 16, color: Colors.white, backgroundColor: Colors.transparent, fontWeight: FontWeight.normal),
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 10, vertical: 1),
- EdgeInsets margin = const EdgeInsets.all(1.0),
- BoxDecoration? decoration = const BoxDecoration(color: Colors.transparent, borderRadius: BorderRadius.all(Radius.circular(6))),
- double? maxWidth,
- int? maxLines,
- TextOverflow overflow = TextOverflow.clip,
创建字幕样式配置。
Creates a subtitle style configuration.
textStyle字幕文本样式。 The text style for subtitle text.padding字幕容器内边距。 The padding inside the subtitle container.margin字幕容器外边距。 The margin outside the subtitle container.decoration字幕容器装饰。 The decoration for the subtitle container.maxWidth字幕容器最大宽度。 The maximum width of the subtitle container.maxLines字幕文本最大行数。 The maximum number of lines for subtitle text.overflow字幕文本溢出策略。 The overflow strategy for subtitle text.
Implementation
const SubtitleStyleConfig({
this.textStyle = const TextStyle(
fontSize: 16,
color: Colors.white,
backgroundColor: Colors.transparent,
fontWeight: FontWeight.normal,
),
this.padding = const EdgeInsets.symmetric(horizontal: 10, vertical: 1),
this.margin = const EdgeInsets.all(1.0),
this.decoration = const BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.all(Radius.circular(6)),
),
this.maxWidth,
this.maxLines,
this.overflow = TextOverflow.clip,
});