flutter_subtitle_wrapper
flutter_subtitle_wrapper copied to clipboard
Adding options for full width and padding for text container
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