How to test functions that throw in Flutter When writing tests for functions that throw, we should not invoke them directly, but rather pass them as arguments using a tear-off. 291 views17:27