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

Merged
merged 6 commits into from
Jan 16, 2025

Conversation

akmalova
Copy link
Contributor

@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.

Copy link
Collaborator

@diegotori diegotori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than this nit, everything else looks good for this PR.

@diegotori
Copy link
Collaborator

@akmalova Are you still actively working on this PR?

@akmalova akmalova requested a review from diegotori January 9, 2025 16:42
@akmalova
Copy link
Contributor Author

akmalova commented Jan 9, 2025

Done

@diegotori
Copy link
Collaborator

@akmalova Please run dart format on the current changes. Also added some additional feedback. Please address that in order for me to approve your changes. Thanks.

@diegotori
Copy link
Collaborator

Lastly, please re-sync your changes with master. Thanks.

@diegotori
Copy link
Collaborator

@akmalova you still with us on this PR?

@akmalova
Copy link
Contributor Author

@diegotori Yes, I'm sorry, I didn't have time. I've fixed everything now.

@akmalova akmalova requested a review from diegotori January 16, 2025 16:25
Copy link
Collaborator

@diegotori diegotori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@diegotori diegotori merged commit 3b6271a into fluttercommunity:master Jan 16, 2025
2 checks passed
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 11.11111% with 8 lines in your changes missing coverage. Please review.

Project coverage is 44.91%. Comparing base (8ac8700) to head (39f06c5).
Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
lib/src/material/material_controls.dart 16.66% 5 Missing ⚠️
...rc/cupertino/widgets/cupertino_options_dialog.dart 0.00% 1 Missing ⚠️
lib/src/material/material_desktop_controls.dart 0.00% 1 Missing ⚠️
lib/src/material/widgets/options_dialog.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #871      +/-   ##
==========================================
- Coverage   45.26%   44.91%   -0.35%     
==========================================
  Files          22       22              
  Lines        1542     1545       +3     
==========================================
- Hits          698      694       -4     
- Misses        844      851       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants