Would it make more sense for this function to be part of the ` DropdownButton` prototype? You wouldn't need to pass any parameters then.