Reputation: 3147
For example:
If I run this App in DartPad the console only says Script Error
. How can I get more information (What is the exact error? Where is it located?, ...)?
Upvotes: 3
Views: 1356
Reputation: 161
Try to wrap your code inside the try-catch block and then print the error on the console.
For example,
try {
Navigator.of(context).push(MaterialPageRoute(builder: (context) => ScreenTwo()));
} catch (e) {
print(e);
}
Upvotes: 1