The error looks like this:
E/flutter ( 3378): [ERROR:flutter/runtime/dart_isolate.cc(144)] Could not prepare isolate.
E/flutter ( 3378): [ERROR:flutter/runtime/runtime_controller.cc(422)] Could not create root isolate.
E/flutter ( 3378): [ERROR:flutter/shell/common/shell.cc(609)] Could not launch engine with configuration.
I am getting this error when I use StatefulWidget
and StatelessWidgets
. I don't get these errors when I write code without using them.
How can I fix this error?
I had this error before because I forgot to use the runApp(MyApp()) in void main
I know this is old but I'm answering for the record for if someone is having this issue.
You probably just forgot to write the main method in main.dart
Just add:
void main() => runApp(const MyApp());
before the class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With