mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
Update lib/wrappers/players/lib_mpv.dart
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
parent
480766f75f
commit
2b2cd40d4f
1 changed files with 7 additions and 0 deletions
|
|
@ -219,6 +219,13 @@ class _VideoSubtitlesState extends ConsumerState<_VideoSubtitles> {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState(); // Move to very start as per best practices
|
super.initState(); // Move to very start as per best practices
|
||||||
subscription = widget.controller.player.stream.subtitle.listen((value) {
|
subscription = widget.controller.player.stream.subtitle.listen((value) {
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
subscription?.cancel();
|
||||||
|
subscription = null;
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
subtitle = value;
|
subtitle = value;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue