bool? optBool(String key, [bool? defaultValue]) { switch (_params[key]?.toLowerCase()) { case 'true': return true; case 'false': return false; default: return defaultValue; } }