int? paramInt(String key) { final value = queryParams[key]; if (value == null) return null; return int.tryParse(value); }