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
The method 'ChromeDevToolsService' isn't defined for the class #99
Labels
bug
Something isn't working
Comments
|
However, I got the // lib/main.dart
import 'package:flutter/material.dart';
import 'package:webf/webf.dart';
import 'package:webf/devtools.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
//use MaterialApp() widget like this
home: Home(), //create new widget class for this 'home' to
// escape 'No MediaQuery widget found' error
);
}
}
//create new class for "home" property of MaterialApp()
class Home extends StatelessWidget {
const Home({super.key});
@override
Widget build(BuildContext context) {
final MediaQueryData queryData = MediaQuery.of(context);
final Size viewportSize = queryData.size;
return Scaffold(
body: Center(
child: Column(
children: [
WebF(
devToolsService:
ChromeDevToolsService(), // Enable Chrome DevTools Services
viewportWidth: viewportSize.width -
queryData.padding.horizontal, // Adjust the viewportWidth
viewportHeight: viewportSize.height -
queryData.padding.vertical, // Adjust the viewportHeight
bundle: WebFBundle.fromUrl(
'https://andycall.oss-cn-beijing.aliyuncs.com/demo/demo-vue.js'), // The page entry point
),
],
),
));
}
}
logs
|
It seems no windows support currently. |
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Affected version
^0.12.0+1
No same issues found.
Steps to Reproduce
flutter create webf_example
cd webf_example
flutter pub add webf
modify the code in
lib/main.dart
as the follows.flutter run -d windows
Code example
The example code on readme.
Expected results
work as expected
Actual results
Error with
lib/main.dart(22,30): error GE5CFE876: The method 'ChromeDevToolsService' isn't defined for the class 'MyApp'. [D:\code\flutter\webf_example\build\windows\flutter\flutter_assemble.vcxproj]
The text was updated successfully, but these errors were encountered: