int? getInt(String name) { final value = params[name]; if (value is num) { return value.toInt(); } return null; }