-
Notifications
You must be signed in to change notification settings - Fork 72
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
fix: only decorate the content of the modal #203
Conversation
Visit the preview URL for this PR (updated for commit 15d867b):
(expires Thu, 16 May 2024 23:15:42 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 906758393beb0353b979d020649d6a1efc40fb5b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benthillerkus This is a good catch! Thanks. The next release will be very soon. In fact the documentation states that the decorator decorates the content.
@ulusoyca I've updated from 0.5.x to 0.7.x . The |
@vishna This is strange because we have the coffee maker demo app that utilizes the provider added by the The demo app works fine. https://github.com/woltapp/wolt_modal_sheet/blob/main/coffee_maker/lib/home/online/store_online_content.dart#L104 Please let me know if there is a bug. We can quickly make a hotfix. |
@ulusoyca your demo works correct as it is, however if you would modify: static WoltModalSheetPage build({required BuildContext context, required String coffeeOrderId}) and then replace e.g.: Builder(builder: (context) {
final model = context.read<StoreOnlineViewModel>();
return WoltElevatedButton(
onPressed: () {
model.onCoffeeOrderStatusChange(
coffeeOrderId, CoffeeMakerStep.addWater);
Navigator.pop(context);
},
child: const Text('Start grinding'),
);
}), with WoltElevatedButton(
onPressed: () {
final model = context.read<StoreOnlineViewModel>();
model.onCoffeeOrderStatusChange(
coffeeOrderId, CoffeeMakerStep.addWater);
Navigator.pop(context);
},
child: const Text('Start grinding'),
); this would fail probably in Maybe you don't need context in the |
Anyway updated my code not to use context from pageListBuilder, had to wrap a bunch of things with |
Thanks for debugging! I will make sure this is addressed correctly. |
Description
This narrows the part of the tree on to which the user-provided decorator function is applied to to just the modal, instead of also wrapping the barrier.
Related Issues
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process.
///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?