throwIf function
Two handy function that helps me to express my intention clearer and shorter to check for runtime errors
Implementation
// ignore: avoid_positional_boolean_parameters
void throwIf(bool condition, Object error) {
if (condition) throw error;
}