Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed pop the wrong page when changing the speed #871

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

akmalova
Copy link

@akmalova akmalova commented Nov 19, 2024

Fixed pop the wrong page when changing the speed
Issue: #618

This was during the speed change and the use of additional options. This was due to the use of the wrong context. In order for the bottom sheet to close correctly, we need to use the context of the bottom sheet itself.

await showModalBottomSheet<OptionItem>(
              context: context,
              isScrollControlled: true,
              useRootNavigator: chewieController.useRootNavigator,
              builder: (context) => OptionsDialog(
                options: options,
                options: _buildOptions(context),
                cancelButtonText:
                    chewieController.optionsTranslation?.cancelButtonText,
              ),

In this regard, I had to add the BuildContext context parameter to the OptionItem model in onTap callback. Now there is no such problem.
Function(BuildContext context)? onTap;

Such a bug was noticed in a project where we use AutoRoute package, so maybe this bug has something to do with using this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant