-
Notifications
You must be signed in to change notification settings - Fork 327
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
Initial commit for package:devtools_extensions
#6055
Initial commit for package:devtools_extensions
#6055
Conversation
static DevToolsExtensionEvent pong = | ||
DevToolsExtensionEvent(DevToolsExtensionEventType.pong); | ||
|
||
final DevToolsExtensionEventType type; |
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.
What's the point to differentiate types of extensions if they behave equally?
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.
Each extension will share some underlying framework for integration with DevTools (connection to DevTools, connection to a VM service, etc.), but the functionality that each extension provides will be entirely dependent on the use case a package or extension author addresses.
|
||
/// Data model for a devtools extension event that will be sent and received | ||
/// over 'postMessage' between DevTools and the embedded extension iFrame. | ||
class DevToolsExtensionEvent { |
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.
Can you explain in doc comment why the events are needed, and how they are supposed to be used?
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.
Added a reference to [DevToolsExtensionEventType]. This code is incomplete right now since we are starting with the ping
, pong
support, but in the future we will also support events like connectToVmService
, maybe showNotification
etc. When we support more events, the DevToolsExtensionEventType
enum will be self documenting.
@@ -0,0 +1,18 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
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.
Does this file need to be included?
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.
we include the .iml file for the other packages devtools_app
, devtools_shared
, devtools_test
, so following that pattern and including this one as well.
|
||
dependencies: | ||
flutter: | ||
sdk: flutter |
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.
I'm assuming we plan on exposing widgets / ValueNotifier
s through this package?
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.
Yeah, this package will also include a template for extension authors to place at the root of their devtools extension app
This PR adds the
devtools_extensions
package todevtools/packages/
. The initial commit for this package includes some shared data models that will be used by both DevTools and extension authors.work towards #1632.