0

When using flutter drive my tests still pass even when there was a runtime exception in the stack.

For example, adding this code to build(), goes undetected:

int? i;
i!.round();

Does anyone know how I can fail on this error?

shawnblais
  • 1,038
  • 11
  • 23

1 Answers1

-2
try{}
catch(e){print('error: $e')}

and if you know the exception then add this way:-

try
on
catch