mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-13 09:20:31 -07:00
refactor: Move super.initState() to the start of initState for best practices
This commit is contained in:
parent
2b2cd40d4f
commit
ee824f5f16
1 changed files with 0 additions and 7 deletions
|
|
@ -219,13 +219,6 @@ 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