refactor: Move super.initState() to the start of initState for best practices

This commit is contained in:
Kirill Boychenko 2025-07-28 01:13:32 +02:00
parent 2b2cd40d4f
commit ee824f5f16

View file

@ -219,13 +219,6 @@ class _VideoSubtitlesState extends ConsumerState<_VideoSubtitles> {
void initState() {
super.initState(); // Move to very start as per best practices
subscription = widget.controller.player.stream.subtitle.listen((value) {
@override
void dispose() {
subscription?.cancel();
subscription = null;
super.dispose();
}
if (mounted) {
setState(() {
subtitle = value;