widgetbook icon indicating copy to clipboard operation
widgetbook copied to clipboard

feat: confirm before exit on mobile devices

Open iv4n-ga6l opened this issue 1 year ago • 7 comments

Replace this paragraph with a description of what this PR is changing or adding, and why.

List of issues which are fixed by the PR

when we accidentally click on Hardware button in Android, whole application is closed.

Screenshots

If applicable, add screenshots to help explain the changes.

Checklist

  • [ ] I signed the CLA.
  • [ ] I listed at least one issue that this PR fixes in the description above.
  • [ ] I updated/added relevant documentation (doc comments with ///).
  • [ ] I added new tests to check the change I am making].
  • [ ] All existing and new tests are passing.

If you need help, consider asking for advice on Discord.

iv4n-ga6l avatar Jun 23 '24 01:06 iv4n-ga6l

Hello, I added your version into my test project but exit dialog doesn't show me.

Screenshot 2024-06-23 at 7 24 43

mjablecnik avatar Jun 23 '24 05:06 mjablecnik

@mjablecnik The change have been made on this file https://github.com/IvanGael/widgetbook/blob/main/packages/widgetbook/lib/src/layout/mobile_layout.dart

Just a question! In the widgetbook project folder, which folder should I run in order to test the changes?

iv4n-ga6l avatar Jun 23 '24 11:06 iv4n-ga6l

@IvanGael

In the widgetbook project folder, which folder should I run in order to test the changes?

You can run some example and test it there..

mjablecnik avatar Jun 23 '24 11:06 mjablecnik

Hello @mjablecnik I tested a full example here https://github.com/widgetbook/widgetbook/tree/main/examples but I don't see any change despite the fact that some changes have been made on this file https://github.com/IvanGael/widgetbook/blob/main/packages/widgetbook/lib/src/layout/mobile_layout.dart

iv4n-ga6l avatar Jun 26 '24 11:06 iv4n-ga6l

Hello @IvanGael 👋

Please make sure that your development environment is set up correctly. It seems like you are using the hosted Widgetbook package and not the local one, which has the changes you made.

To do so set up everything correctly, use melos as mentioned here.

yousinix avatar Jun 26 '24 11:06 yousinix

@YoussefRaafatNasry I set up melos and it seems everything is good. How to use the local widgetbook package instead of which is hosted ?

iv4n-ga6l avatar Jun 28 '24 11:06 iv4n-ga6l

@IvanGael After installing melos, you need to:

  1. Undo all the pubspec.lock files changes in this PR.
  2. Run melos bs to install the dependancies and use the local Widgetbook version.

yousinix avatar Jun 28 '24 15:06 yousinix

@IvanGael Any progress?

mjablecnik avatar Jul 26 '24 07:07 mjablecnik

@mjablecnik Not done yet. I need to take a look on this because i have tried what @YoussefRaafatNasry suggested to me but It seems there is any changes

iv4n-ga6l avatar Jul 27 '24 17:07 iv4n-ga6l

I will be closing this PR for staying stale. Please re-open a new one once it's ready to review.

yousinix avatar Oct 14 '24 12:10 yousinix