-
Notifications
You must be signed in to change notification settings - Fork 336
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 DevToolsExtension
template to devtools_extension
package
#6066
Conversation
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.
How about moving template out of lib
to example
and make it separate package with its own pubspec.yaml?
You will have to create example
anyway, because it will be requested by pub.get publishing code.
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.
the template isn't an example - it is actually the file an extension author would import to write a devtools extension.
import 'package:devtools_extensions/api.dart';
import 'package:flutter/material.dart';
import 'package:devtools_extensions/template.dart';
void main() {
runApp(const FooPackageDevToolsExtension());
}
class FooPackageDevToolsExtension extends StatelessWidget {
const FooPackageDevToolsExtension({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Foo DevTools Extension',
home: const DevToolsExtension(
child: FooExtensionHomePage(),
),
);
}
}
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.
renamed to devtools_extensions.dart
to make that more clear
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 an example
dir in #6069
Work towards #1632.