-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add a knob to show layout explorer view #78
Comments
I've done some investigation, and I don't think that's (easily) doable. Some helpers can be done (e.g. switching Using Flutter layout inspector will require a huge amount of work, as it's not available as a library that can be integrated. But the idea is interesting, I'll leave the issue open, maybe there are other solutions. |
@ookami-kb @prolificcoder just saw this issue, and I think I have some sort of a solution for this. I've published a package called I've tried incorporating it with Example code: class StorybookApp extends StatelessWidget {
StorybookApp({super.key});
final storybookKey = GlobalKey();
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Inspector(
child: Storybook(
key: storybookKey,
stories: stories,
),
),
),
);
}
} Let me know if this works. P.S. The package still needs some improvements, but alas I don't have enough time to maintain it. However, the core functionality still works :) |
@kekland it looks pretty interesting, I'll check it, thanks! |
@ookami-kb I've just updated Inspector to 1.1.4, which should bring some improvements. Another thing is that I've fixed an issue with the package that previously made using it in return Storybook(
key: storybookKey,
stories: stories,
wrapperBuilder: (context, child) => materialWrapper(
context,
Inspector(child: child!),
),
); Perhaps I can make a package which exports Inspector as a plugin for storybook_flutter? |
@kekland yes, a separate plug-in package makes total sense 👍 |
Not sure how complicated this is but would it be possible to add a know for something that we see in a layout explorer?
I am more interested in seeing margins and paddings.
Some context: We are hoping to give access to our Desingers pre-merge for custom widgets, so that they can play with them and make sure they are good before developers merge them.
The text was updated successfully, but these errors were encountered: