abdelaziz-mahdy / flutter_meedu_videoplayer

Cross-Platform Video Player for flutter
https://abdelaziz-mahdy.github.io/flutter_meedu_videoplayer/
MIT License
132 stars 69 forks source link

Component state doesn't get updated when in fullscreen #80

Closed roxxel closed 1 year ago

roxxel commented 1 year ago

https://github.com/zezo357/flutter_meedu_videoplayer/assets/64275777/5156b360-9754-4caa-804a-fbe832ddb351

abdelaziz-mahdy commented 1 year ago

The state is in the header so its updates are handled by you, if you can provide the code I can help you implement the updates for it

roxxel commented 1 year ago

Yes, but as shown on video everything works okay when not in fullscreen

abdelaziz-mahdy commented 1 year ago

The header widget is passed on to the Fullscreen unless you pass a different widget it should not be different

But sadly I can't debug the problem without seeing a sample code for it

roxxel commented 1 year ago
DropdownButton(
  value: selectedSeason,
  items: seasons!
      .map((e) => DropdownMenuItem(
          child: Text(
              "Cезон " + e.id!.toString()),
          value: e.id!))
      .toList(),
  onChanged: (season) {
    loadStream(media!, selectedTranslation!,
            season, 1)
        .then((value) {
      this.streams = value;
      _quality.value = streams.firstWhere(
          (element) =>
              element.quality == "1080p");
      setState(() {
        selectedSeason = season!;
      });
      _setDataSource();
    });
  }),
abdelaziz-mahdy commented 1 year ago
DropdownButton(
  value: selectedSeason,
  items: seasons!
      .map((e) => DropdownMenuItem(
          child: Text(
              "Cезон " + e.id!.toString()),
          value: e.id!))
      .toList(),
  onChanged: (season) {
    loadStream(media!, selectedTranslation!,
            season, 1)
        .then((value) {
      this.streams = value;
      _quality.value = streams.firstWhere(
          (element) =>
              element.quality == "1080p");
      setState(() {
        selectedSeason = season!;
      });
      _setDataSource();
    });
  }),

e.id? Where is it stored? And how to you pass the headers ?

If you are not comfortable sharing the code on GitHub and don't mind discord let me know.

roxxel commented 1 year ago

Okay, Roxxel#8115. Thanks for helping.

abdelaziz-mahdy commented 1 year ago

Okay, Roxxel#8115. Thanks for helping.

Sent friend request