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

Dialog + Inspector #2

Open
TomaszCz opened this issue Sep 26, 2024 · 3 comments
Open

Dialog + Inspector #2

TomaszCz opened this issue Sep 26, 2024 · 3 comments

Comments

@TomaszCz
Copy link

I have a feature proposition, there is still possibility to have dialog / pop up in mobile. If that is the case, the inspector buttons such as color / size inspection is unreachable :)

image

@mjablecnik
Copy link
Member

Thank you for your issue.

When you develop some dialogs, you should have dialog content in your stories instead of call showDialog function and then develop it.

For example. Instead of:

showDialog(
  context: context,
  builder: (BuildContext context) {
    return AlertDialog(
      title: Text('Alert Dialog Title'),
      content: Text('This is a simple alert dialog.'),
      actions: [
        TextButton(
          onPressed: () {
            Navigator.of(context).pop();
          },
          child: Text('OK'),
        ),
      ],
    );
  }
);  

You can have only:

Story(
  name: 'Dialog,
  description: 'Simple dialog widget.',
  builder: (context) => AlertDialog(
    title: Text('Alert Dialog Title'),
    content: Text('This is a simple alert dialog.'),
    actions: [
      TextButton(
        child: Text('OK'),
      ),
    ],
  );
)

and every story will represent some different dialog.

@TomaszCz
Copy link
Author

TomaszCz commented Oct 1, 2024

Maybe you are right, i basically cannot imitate full dialog behavior in device mode. I would argue that dialog is not just what is inside the frame, but the overall look on phone is equally important. I tried insetPadding but it is not respected.

image

@mjablecnik
Copy link
Member

mjablecnik commented Oct 6, 2024

@TomaszCz Yes, I understand your problem. I will try to find some good solution of this situation.

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

No branches or pull requests

2 participants