We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug In WoltModalSheet when there is a transition from one page to another, both of the pages are rebuilding.
For example in Coffee Maker App:
return [ AddWaterDescriptionModalPage.build( onNextPage: goToNextPage, onCancelPressed: () { model.onCoffeeOrderStatusChange(coffeeOrderId); Navigator.pop(context); }, onClosed: Navigator.of(context).pop, ), WaterSettingsModalPage.build( onBackButtonPressed: goToPreviousPage, onClosed: Navigator.of(context).pop, onWaterAdded: () { model.onCoffeeOrderStatusChange( coffeeOrderId, CoffeeMakerStep.ready); Navigator.pop(context); }, ) ];
class AddWaterDescriptionModalPage { AddWaterDescriptionModalPage._(); static WoltModalSheetPage build({ required VoidCallback onCancelPressed, required VoidCallback onNextPage, required VoidCallback onClosed, }) { return WoltModalSheetPage( child: Builder(builder: (context) { print('Rebuild AddWaterDescriptionModalPage'); return const Padding(
class WaterSettingsModalPage { WaterSettingsModalPage._(); static WoltModalSheetPage build({ required VoidCallback onBackButtonPressed, required VoidCallback onClosed, required VoidCallback onWaterAdded, }) { final buttonEnabledListener = ValueNotifier(false); return WoltModalSheetPage( child: Builder(builder: (context) { print('Rebuild WaterSettingsModalPage'); return Padding(...
When I transition from AddWaterDescriptionModalPage to WaterSettingsModalPage the console output is: When I transition back:
This is especially problem when I want to use Bloc specific to a dialog page like:
WoltModalSheetPage( child: BlocProvider( create: (context) => TestBloc(),
Which ends up creating the bloc multiple times.
The page should be drawn once and not rebuild unless it is triggered.
Please let me know if there is a way to handle this behaviour. Thanks a lot
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug report
Describe the bug
In WoltModalSheet when there is a transition from one page to another, both of the pages are rebuilding.
Steps to reproduce
For example in Coffee Maker App:
When I transition from AddWaterDescriptionModalPage to WaterSettingsModalPage the console output is:
When I transition back:
This is especially problem when I want to use Bloc specific to a dialog page like:
Which ends up creating the bloc multiple times.
Expected behavior
The page should be drawn once and not rebuild unless it is triggered.
Please let me know if there is a way to handle this behaviour.
Thanks a lot
The text was updated successfully, but these errors were encountered: