void checkCondition(bool condition, [String message = '']) { if (!condition) { throw StateError(message); } }