flutter_subtitle_wrapper icon indicating copy to clipboard operation
flutter_subtitle_wrapper copied to clipboard

Adding options for full width and padding for text container

Open Chojecki opened this issue 1 year ago โ€ข 0 comments

Description

I didn't find a way to add padding or make text container full width. So now SubtitleTextView can take extra arguments to set it.

class SubtitleWrapper extends StatelessWidget {
  const SubtitleWrapper({
    required this.videoChild,
    required this.subtitleController,
    required this.videoPlayerController,
    super.key,
    this.subtitleStyle = const SubtitleStyle(),
    this.backgroundColor,
    this.fullWidth = false,
    this.padding,
  });
  final Widget videoChild;
  final SubtitleController subtitleController;
  final VideoPlayerController videoPlayerController;
  final SubtitleStyle subtitleStyle;
  final Color? backgroundColor;
  final bool fullWidth; <-- new thing
  final double? padding; <-- new thing

... rest of the code

Type of Change

  • [x] โœจ New feature (non-breaking change which adds functionality)
  • [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
  • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] ๐Ÿงน Code refactor
  • [ ] โœ… Build configuration change
  • [ ] ๐Ÿ“ Documentation
  • [ ] ๐Ÿ—‘๏ธ Chore

Chojecki avatar Oct 31 '23 10:10 Chojecki